/* ===== estilo original 1 ===== */

        /* =========================================================
           VARIÁVEIS GLOBAIS - PALETA: AZUL MARINHO, DOURADO, VERDE, AZURE
           ========================================================= */
        :root {
            --cor-principal: #1a2a44;        /* Azul Marinho */
            --cor-principal-clara: #3d5a7d;  /* Azul Marinho Claro */
            --cor-principal-escura: #1a2a44; /* Azul Marinho */
            --cor-fundo: #f8f9fc;
            --cor-branco: #ffffff; 
            --cor-texto-escuro: #1a2a44; 
            --cor-texto-medio: #4a5568; 
            --cor-texto-claro: #718096;
            --cor-borda: #d4c5b9;            /* Tom Champanhe/Dourado suave */
            --cor-fundo-destaque: #fdfafb;
            
            --verde-sucesso: #27ae60;
            --vermelho-despesa: #e53e3e;
            --amarelo-alerta: #d69e2e;
            --cor-dourado: #c5a059;          /* Dourado */
            --azul-lucro: #a85f6c;           /* Azure/Azul Royal */

            --cor-inicial:     #2e7d32;
            --cor-liquidacao:  #1565c0;
            --cor-impugnacao:  #1a2a44;
            --cor-atualizacao: #1a2a44;
            --cor-contingencia:#1a2a44;
            --cor-andamento:   #c5a059; 
            --cor-concluido:   #27ae60;
/* =========================================
   TOOLTIP PERSONALIZADO DA AGENDA
   ========================================= */
#tooltip-agenda {
    display: none;
    position: absolute !important;
    background-color: #2b2b2b !important; /* Fundo escuro */
    color: #ffffff !important; 
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 11px !important; /* Força a fonte a ser pequenininha */
    font-family: Arial, sans-serif !important;
    line-height: 1.4 !important;
    z-index: 999999 !important; /* Força a ficar na frente de TUDO */
    box-shadow: 2px 4px 8px rgba(0,0,0,0.4) !important;
    pointer-events: none !important; 
    white-space: pre-wrap !important;
    
    /* Isso garante que ele fique no formato de caixinha, sem esticar a tela toda: */
    width: max-content !important; 
    max-width: 350px !important; 
    text-align: left !important;
}

            --font-corpo: 'Segoe UI', Arial, sans-serif;
            --font-titulo: 'Segoe UI', Arial, sans-serif;
            --font-assinatura: 'Great Vibes', 'Autography', cursive;
            --font-size-pdf: 13px;
            --lh-pdf: 1.7;
        }

        body { font-family: var(--font-corpo); background-color: var(--cor-fundo); color: var(--cor-texto-medio); margin: 0; padding: 0; }
        h1, h2, h3, .logo-text { font-family: var(--font-titulo); color: var(--cor-principal-escura); }
        
        .main-header { background-color: var(--cor-principal-escura); color: var(--cor-dourado); text-align: center; padding: 25px 0 15px 0; position: relative; border-bottom: 3px solid var(--cor-dourado); }
        .main-header h1 { margin: 0; font-size: 32px; letter-spacing: 1px; color: var(--cor-branco); }
        .main-header p { margin: 5px 0 0 0; font-size: 13px; color: var(--cor-principal-clara); font-family: var(--font-corpo);}
        
        .nav-tabs { display: flex; justify-content: center; background-color: var(--cor-principal-escura); border-bottom: 2px solid var(--cor-dourado); flex-wrap: wrap;}
        .nav-tabs button { background: none; border: none; color: white; padding: 15px 20px; cursor: pointer; font-size: 15px; font-weight: bold; transition: 0.3s; opacity: 0.8; font-family: inherit;}
        .nav-tabs button:hover, .nav-tabs button.active { background-color: var(--cor-fundo); opacity: 1; color: var(--cor-principal-escura); border-top-left-radius: 6px; border-top-right-radius: 6px;}
        
        .container { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
        .tab-content { display: none; }
        .tab-content.active { display: block; }
        
        .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid var(--cor-borda); }
        .header h1 { color: var(--cor-principal-escura); margin: 0; font-size: 26px; }
        
        .btn { padding: 12px 24px; border: none; border-radius: 6px; font-size: 14px; font-weight: bold; cursor: pointer; transition: all 0.2s; font-family: inherit;}
        .btn-primario { background-color: var(--cor-principal-escura); color: var(--cor-branco); }
        .btn-secundario { background-color: var(--cor-fundo-destaque); color: var(--cor-texto-escuro); border: 1px solid var(--cor-borda); }
        .btn-sucesso { background-color: var(--verde-sucesso); color: var(--cor-branco); }
        .btn-acao { background-color: var(--azul-lucro); color: var(--cor-branco); padding: 8px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; }

/* Efeito de Hover nos Botões para dar interatividade */
.btn-primario:hover { 
    background-color: var(--cor-dourado); /* Muda de Marinho para Dourado ao passar o mouse */
    color: var(--cor-branco);
}

.btn-secundario:hover {
    background-color: var(--cor-borda);
    color: var(--cor-texto-escuro);
}

/* Efeito de elevação sutil nas abas ao passar o mouse (antes de clicar) */
.nav-tabs button:not(.active):hover {
    transform: translateY(-2px);
    color: var(--cor-dourado); /* O texto fica dourado ao passar o mouse */
}

/* Layout Financeiro Clean */
.fin-group-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fin-group-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--cor-principal-escura);
}

.fin-group-partes {
    font-size: 11px;
    color: #718096;
    margin-top: 2px;
}

.fin-row-servico {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.fin-status-pill {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Deixar a tabela com linhas mais finas */
#corpoTabelaFin td {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
}

/* ESTILOS DO NOVO DASHBOARD */
.dash-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.dash-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-left: 5px solid #ccc; }
.dash-card.blue { border-left-color: #3498db; }
.dash-card.yellow { border-left-color: #f1c40f; }
.dash-card.purple { border-left-color: #9b59b6; }
.dash-card.green { border-left-color: #27ae60; }
.dash-card.full-width { grid-column: 1 / -1; border-left-color: #e67e22; }

.dash-label { font-size: 13px; color: #7f8c8d; font-weight: bold; text-transform: uppercase; display: block; margin-bottom: 10px; }

.dash-panel { background: white; border-radius: 12px; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); min-height: 200px; border-top: 5px solid #ccc;}
.dash-panel.red { border-top-color: #e74c3c; }
.dash-panel.orange { border-top-color: #e67e22; }
.dash-panel.gold { border-top-color: #f1c40f; }
.dash-panel.white { border-top-color: #ecf0f1; }

.dash-panel h3 { font-size: 16px; margin-top: 0; color: #2c3e50; border-bottom: 1px solid #eee; padding-bottom: 10px; }

.item-prazo-dash { background: #fdfdfd; border: 1px solid #eee; padding: 10px; border-radius: 6px; margin-bottom: 10px; border-left: 3px solid #ccc; }
.item-prazo-dash strong { display: block; font-size: 12px; color: #2c3e50; }
.item-prazo-dash span { font-size: 11px; color: #7f8c8d; }
.item-prazo-dash .status-atraso { color: #e74c3c; font-weight: bold; font-size: 11px; margin-top: 5px; display: block; }

.ranking-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f9f9f9; font-size: 13px; }
.ranking-item:last-child { border-bottom: none; }

/* Estilo específico para a tabela de Saúde e Lucratividade */
.tabela-saude-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    font-weight: bold;
    padding: 10px;
    border-bottom: 2px solid #eee;
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tabela-saude-linha {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    padding: 12px 10px;
    border-bottom: 1px solid #f9f9f9;
    align-items: center;
    font-size: 13px;
    transition: background 0.2s;
}

.tabela-saude-linha:hover {
    background-color: #fcfafb;
}

.tabela-saude-linha .nome-escritorio {
    font-weight: bold;
    color: var(--cor-principal-escura);
}

.tabela-saude-linha .valor-centro {
    text-align: center;
    color: #4a5568;
}

.tabela-saude-linha .valor-total {
    text-align: right;
    font-weight: bold;
    color: #2d3748;
}

.tabela-tempo-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-weight: bold;
    padding: 10px;
    border-bottom: 2px solid #eee;
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.tabela-tempo-linha {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px;
    border-bottom: 1px solid #f9f9f9;
    font-size: 12px;
    align-items: center;
}

.badge-tempo {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
}

.valor-hora-positivo {
    color: #27ae60;
    font-weight: bold;
}

/* GRID PARA CLIENTES E PÓS-VENDA */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-pos-venda {
    background: #ffffff;
    border-left: 5px solid var(--cor-principal); /* Ajustado para a cor oficial da sua paleta */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-pos-venda-header {
    font-weight: bold;
    color: var(--cor-principal-escura);
    font-size: 16px;
    margin-bottom: 5px;
}

.card-pos-venda-body {
    font-size: 13px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}


        /* TELA DE ORÇAMENTO */
        #area-formulario { max-width: 1100px; margin: 0 auto; background-color: var(--cor-branco); padding: 30px; border-radius: 8px; border: 1px solid var(--cor-borda); box-shadow: 0 4px 15px rgba(26, 42, 68, 0.1); }
        #area-formulario h1, #area-formulario h2, #area-formulario h3, #area-formulario h4, #area-formulario legend { color: var(--cor-principal-escura); }
        .header-tela { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--cor-borda); padding-bottom: 15px; margin-bottom: 25px; }
        fieldset { border: 1px solid var(--cor-borda); border-radius: 8px; padding: 20px; margin-bottom: 25px; background-color: var(--cor-branco); }
        legend { background-color: var(--cor-fundo-destaque); border: 1px solid var(--cor-borda); padding: 6px 18px; border-radius: 4px; font-size: 16px; font-family: var(--font-titulo); color: var(--cor-principal);}
        .form-row { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
        .form-group { flex: 1; display: flex; flex-direction: column; min-width: 200px; }
        .form-group label { font-weight: bold; font-size: 12px; margin-bottom: 5px; color: var(--cor-texto-escuro); font-family: var(--font-corpo);}
        .form-group input, .form-group select { padding: 10px; border: 1px solid var(--cor-borda); border-radius: 4px; font-size: 13px; color: var(--cor-texto-escuro); background-color: var(--cor-fundo); font-family: var(--font-corpo);}
        .form-group input:focus, .form-group select:focus, textarea:focus { outline: none; border-color: var(--cor-principal); background-color: var(--cor-branco);}
        .form-group input[readonly] { background-color: var(--cor-fundo-destaque); font-weight: bold; color: var(--cor-principal-escura); border-style: dashed;}
        .form-group input:disabled { background-color: #f0f0f0; color: #999; cursor: not-allowed; }
        .grid-verbas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
        .verba-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cor-texto-escuro);}
        .painel-preco { background-color: var(--cor-fundo-destaque); border: 2px solid var(--cor-dourado); padding: 20px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }
        .painel-preco .detalhes { font-size: 13px; color: var(--cor-texto-medio); }
        .painel-preco .valor-final { font-size: 28px; font-family: var(--font-titulo); color: var(--cor-principal); }
        .actions { display: flex; gap: 15px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap;}
        .btn-pdf { background-color: var(--cor-principal-escura); color: var(--cor-branco); padding: 15px 30px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 14px; letter-spacing: 1px; font-family: var(--font-corpo); border-bottom: 3px solid var(--cor-dourado);}
        #proposta-impressao { display: none; }

        /* SISTEMA GERAL */
        .card { background: var(--cor-branco); padding: 25px; border-radius: 8px; box-shadow: 0 2px 10px rgba(26, 42, 68, 0.08); margin-bottom: 20px; border-top: 3px solid var(--cor-dourado); }
        .card-title { font-size: 18px; font-weight: bold; color: var(--cor-principal-escura); margin-bottom: 20px; border-bottom: 1px solid var(--cor-borda); padding-bottom: 10px; text-transform: uppercase; font-family: var(--font-titulo);}
        .grid-1 { display: grid; grid-template-columns: 1fr; gap: 15px; }
        .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
        .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
        .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
        .input-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 15px; }
        .input-group label { font-size: 13px; font-weight: 600; color: var(--cor-principal-escura); }
        .input-group input, .input-group select, .input-group textarea { padding: 8px 10px; border: 1px solid var(--cor-borda); border-radius: 6px; font-size: 13px; color: var(--cor-texto-escuro); width: 100%; box-sizing: border-box; font-family: inherit;}
        
        .main-layout { display: flex; gap: 20px; align-items: flex-start; }
        .sidebar { width: 280px; background: var(--cor-branco); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-top: 4px solid var(--cor-andamento); flex-shrink: 0; }
        .sidebar-header { padding: 15px; border-bottom: 1px solid var(--cor-borda); text-align: center; font-weight: bold; }
        .sidebar-header.aguardando { background: #f7fafc; color: #1a2a44; border-top-left-radius: 8px; border-top-right-radius: 8px; }
        .sidebar-header.andamento { background: #fffaf0; color: #975a16; border-top: 1px solid var(--cor-borda); }
        .sidebar-content { padding: 15px; max-height: 400px; overflow-y: auto; }
        .side-task { background: var(--cor-fundo-destaque); padding: 10px; margin-bottom: 10px; border-radius: 4px; font-size: 12px; cursor: pointer; border: 1px solid var(--cor-borda); }
        .side-task.aguardando { border-left: 4px solid var(--cor-texto-claro); }
        .side-task.andamento { border-left: 4px solid var(--cor-andamento); }
        
        .calendar-container { flex-grow: 1; background: var(--cor-branco); border-radius: 8px; padding: 20px; border-top: 3px solid var(--cor-dourado); box-shadow: 0 2px 10px rgba(26, 42, 68, 0.08);}
        .calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .calendar-header button { background: var(--cor-branco); border: 1px solid var(--cor-borda); padding: 8px 15px; border-radius: 6px; cursor: pointer; font-weight: bold; color: var(--cor-principal-escura); }
        .weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: bold; font-size: 12px; color: var(--cor-texto-medio); margin-bottom: 10px; }
        .days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
        .day-box { background: var(--cor-fundo); border: 1px solid var(--cor-borda); border-radius: 6px; min-height: 100px; padding: 5px; display: flex; flex-direction: column; }
        .day-box.empty { background: transparent; border: none; }
        .day-number { font-weight: bold; font-size: 14px; margin-bottom: 5px; padding-left: 5px; color: var(--cor-principal-escura); }

        .task { padding: 4px 7px; border-radius: 4px; font-size: 11px; margin-bottom: 4px; color: var(--cor-branco); cursor: pointer; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; box-shadow: 0 1px 3px rgba(0,0,0,0.1);}
        .task-inicial      { background-color: var(--cor-inicial); }
        .task-liquidacao   { background-color: var(--cor-liquidacao); }
        .task-impugnacao   { background-color: var(--cor-impugnacao); }
        .task-atualizacao  { background-color: var(--cor-atualizacao); }
        .task-andamento    { background-color: var(--cor-andamento) !important; color: #fff; }
        .task-concluido    { background-color: var(--cor-concluido) !important; text-decoration: line-through; opacity: 0.85; }
        .task-aguardando   { background-color: var(--cor-texto-claro) !important; color: #fff; }

        .legenda { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; font-size: 11px; justify-content: center; padding-top: 15px; border-top: 1px solid var(--cor-borda); }
        .legenda-item { display: flex; align-items: center; gap: 5px; color: var(--cor-texto-escuro);}
        .bolinha { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

        .dashboard-cards { display: grid; gap: 20px; margin-bottom: 30px; grid-template-columns: repeat(4, 1fr); } 
        .card-value { font-size: 26px; font-weight: bold; margin-top: 10px; font-family: var(--font-titulo);}
        
        .table-container { background: var(--cor-branco); border-radius: 8px; box-shadow: 0 2px 10px rgba(26, 42, 68, 0.08); overflow: hidden; border: 1px solid var(--cor-borda); margin-bottom: 20px;}
        table { width: 100%; border-collapse: collapse; text-align: left; }
        th { background-color: var(--cor-principal-escura); color: var(--cor-branco); padding: 15px; font-size: 13px; border-bottom: 2px solid var(--cor-dourado); }
        td { padding: 15px; border-bottom: 1px solid var(--cor-borda); font-size: 14px; vertical-align: middle; color: var(--cor-texto-escuro);}
        .status { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; text-align: center; display: inline-block; min-width: 130px; }
        .status.aguardando { background-color: #fefcbf; color: #d69e2e; border: 1px solid #f6e05e; }
        .status.aguardando-aprovacao { background-color: #e2e8f0; color: #4a5568; border: 1px solid #cbd5e0; }
        .status.parcial { background-color: #bee3f8; color: #2b6cb0; border: 1px solid #90cdf4; }
        .status.pago { background-color: #c6f6d5; color: var(--verde-sucesso); border: 1px solid #9ae6b4; }

        /* PAINEL DE MÉTRICAS (CASOS CONCLUÍDOS) */
        .painel-metricas { display: flex; gap: 15px; margin-bottom: 20px; justify-content: space-between; }
        .card-metrica { background-color: #f8f9fa; border-left: 4px solid var(--cor-principal-escura); padding: 15px; border-radius: 8px; flex: 1; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
        .card-metrica h4 { margin: 0; font-size: 12px; color: #666; text-transform: uppercase; font-family: var(--font-corpo); }
        .card-metrica span { display: block; font-size: 24px; font-weight: bold; color: var(--cor-texto-escuro); margin-top: 5px; font-family: var(--font-titulo); }
        
        /* ESTILOS DO RELATÓRIO PDF E LOGO */
        #modoVisRelatorio { display: none; }
        .folha-a4 { background: var(--cor-branco); width: 100%; max-width: 850px; margin: 0 auto; padding: 40px 50px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); color: #000; box-sizing: border-box; position: relative; }
        .doc-header { text-align: center; border-bottom: 2px solid var(--cor-principal-escura); padding-bottom: 15px; margin-bottom: 20px; }
        .doc-header h2 { margin: 0; color: var(--cor-principal-escura); font-size: 22px; text-transform: uppercase; font-family: var(--font-titulo);}
        .doc-header p { margin: 5px 0 0 0; font-size: 13px; color: #555; }
        .doc-section-title { font-size: 13px; font-weight: bold; color: var(--cor-branco); background-color: var(--cor-principal-escura); padding: 5px 10px; margin-bottom: 10px; text-transform: uppercase; border-left: 4px solid var(--cor-dourado);}
        .doc-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
        .doc-table th, .doc-table td { padding: 6px 8px; border: 1px solid #ddd; text-align: left; vertical-align: top;}
        .doc-table th { background-color: #f5f5f5; font-weight: bold; width: 20%; color: #333; }
        
        /* ASSINATURA PADRONIZADA */
        .doc-assinatura { margin-top: 60px; text-align: center; page-break-inside: avoid; }
        .assinatura-linha { border-top: 1px solid var(--cor-texto-medio); margin-bottom: 5px; width: 300px; margin-left: auto; margin-right: auto; }
        .ass-flavia { font-family: var(--font-assinatura) !important; font-size: 28px !important; color: var(--cor-principal) !important; line-height: 1; margin-bottom: 5px; }

        /* AJUSTE DAS CAIXINHAS DO RELATÓRIO (UMA ABAIXO DA OUTRA) */
        .doc-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
        .doc-list-box { border: 1px solid #ddd; padding: 10px; min-height: 40px; font-size: 12px; width: 100%; box-sizing: border-box;}
        
        .mapeamento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px;}
        .doc-item { border: 1px solid #eee; padding: 8px; font-size: 12px; display: flex; justify-content: space-between;}
        
        /* LOGO E MARCA D'ÁGUA */
        .img-logo { max-height: 80px; margin-bottom: 15px; display: block; margin-left: auto; margin-right: auto; }
        .watermark { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.08; max-width: 70%; z-index: -1; pointer-events: none; }

        /* =========================================================
           TELA DE PARECER (EX-IMPUGNAÇÃO)
           ========================================================= */
        .dados-puxados-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; background: var(--cor-fundo-destaque); padding: 15px; border-radius: 8px; border: 1px solid var(--cor-borda); }
        .dp-label { display: block; font-size: 11px; color: #777; text-transform: uppercase; margin-bottom: 3px; }
        
        .ponto-impug { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 25px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; }
        .ponto-header { display: flex; align-items: center; gap: 15px; background: #fdfafb; padding: 15px 20px; border-bottom: 1px solid #e2e8f0; border-top-left-radius: 8px; border-top-right-radius: 8px; }
        .ponto-num { background: var(--cor-principal-escura); color: var(--cor-dourado); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-family: var(--font-titulo); font-size: 16px; flex-shrink: 0; box-shadow: 0 2px 4px rgba(26, 42, 68,0.3); }
        .impug-item-titulo { flex: 1; border: none; background: transparent; font-size: 16px; font-weight: bold; color: var(--cor-principal-escura); border-bottom: 1px dashed transparent; transition: 0.3s; font-family: var(--font-corpo); }
        .impug-item-titulo:focus { outline: none; border-bottom-color: var(--cor-principal-escura); }
        .btn-remover-ponto { background: #fff0f0; color: #e53e3e; border: 1px solid #fed7d7; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; transition: 0.2s; }
        .btn-remover-ponto:hover { background: #e53e3e; color: white; }

        .ponto-conteudo { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
        .bloco-dinamico { position: relative; padding-right: 30px; }
        .btn-remove-bloco { position: absolute; top: 0; right: 0; background: #fed7d7; color: #c53030; border: none; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; }
        .btn-remove-bloco:hover { background: #e53e3e; color: white; }

        .impug-texto-dinamico { width: 100%; padding: 15px; border: 1px solid #e2e8f0; border-radius: 6px; font-family: var(--font-corpo); resize: vertical; line-height: 1.5; color: #4a5568; font-size: 14px; }
        .impug-texto-dinamico:focus { border-color: var(--cor-principal-escura); outline: none; box-shadow: 0 0 0 1px var(--cor-principal-clara); }
        .bloco-imagem { background: #fdfdfd; border: 1px dashed #cbd5e0; padding: 15px; border-radius: 6px; text-align: center; }

        .ponto-controles { padding: 0 20px 20px; display: flex; gap: 12px; }
        .btn-add-bloco { background: white; border: 1px solid var(--cor-principal-escura); color: var(--cor-principal-escura); padding: 8px 16px; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 12px; transition: all 0.2s; display: flex; align-items: center; gap: 5px; }
        .btn-add-bloco:hover { background: var(--cor-principal-escura); color: white; }

        .ponto-nota-interna { background: #f0fff4; padding: 15px 20px; border-top: 1px solid #c6f6d5; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
        .ponto-nota-interna label { color: var(--verde-sucesso); font-size: 11px; font-weight: bold; text-transform: uppercase; }
        .ponto-nota-interna textarea { width: 100%; border: 1px solid #9ae6b4; background: white; margin-top: 5px; padding: 8px; border-radius: 4px; font-family: var(--font-corpo); color: #333;}

        .acoes-resultado { display: none; gap: 15px; justify-content: center; margin-top: 20px; }
        .pdf-wrapper { display: none; background: white; padding: 40px 50px; margin: 20px auto; max-width: 850px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
        .pdf-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--cor-principal-escura); padding-bottom: 15px; margin-bottom: 30px; }
        .doc-pericial-shell { background: linear-gradient(135deg, #fdfcf8 0%, #f8fafc 100%); border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; box-shadow: 0 10px 30px rgba(15,23,42,0.06); }
        .doc-pericial-topbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid #e2e8f0; }
        .doc-pericial-topbar h3 { margin:0; color:var(--cor-principal-escura); font-family:var(--font-titulo); }
        .doc-pericial-topbar p { margin:4px 0 0 0; color:#64748b; font-size:13px; }
        .doc-pericial-nav { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
        .doc-pericial-nav button { border:1px solid #cbd5e0; background:#fff; color:#334155; padding:8px 12px; border-radius:999px; font-weight:600; cursor:pointer; }
        .doc-pericial-nav button.active { background:var(--cor-principal-escura); color:#fff; border-color:var(--cor-principal-escura); }
        .doc-pericial-panel { display:none; }
        .doc-pericial-panel.active { display:block; }
        .doc-pericial-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:16px; margin-bottom:14px; position:relative; overflow:hidden; }
        .doc-pericial-card::before { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(31,41,55,0.03) 0%, rgba(31,41,55,0.00) 100%); pointer-events:none; }
        .doc-pericial-card h4 { margin:0 0 10px 0; color:var(--cor-principal-escura); font-family:var(--font-titulo); }
        .doc-pericial-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
        .doc-pericial-preview { background:white; border:1px solid #e2e8f0; border-radius:12px; padding:28px; box-shadow: inset 0 0 0 1px rgba(15,23,42,0.02); margin-top:16px; position:relative; overflow:hidden; color:#111827; }
        .doc-pericial-preview .watermark { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; opacity:0.06; pointer-events:none; }
        .doc-pericial-preview .watermark img { max-width:360px; }
        .doc-pericial-preview .preview-body { position:relative; z-index:1; }
        .preview-body-doc {
            position: relative;
            overflow: hidden;
            border-radius: 14px;
            padding: 24px 24px 28px;
            background: #ffffff;
            box-shadow: inset 0 0 0 1px rgba(15,23,42,0.04);
        }
        .preview-body-doc::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image: url("logo.png");
            background-repeat: no-repeat;
            background-position: center;
            background-size: 320px;
            opacity: 0.06;
            pointer-events: none;
        }
        .preview-body-doc > * { position: relative; z-index: 1; }
        .preview-body-doc .doc-pericial-section {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-left: 4px solid var(--cor-principal);
        }
        .doc-pericial-meta { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin-bottom:12px; font-size:13px; }
        .doc-pericial-meta strong { color:#334155; }
        .doc-pericial-section { border:1px solid #e2e8f0; border-radius:10px; padding:12px; margin-bottom:12px; background:#fafcff; }
        .doc-pericial-section h5 { margin:0 0 8px 0; color:var(--cor-principal-escura); font-size:14px; }
        .doc-pericial-tabela { width:100%; border-collapse:collapse; margin-top:10px; font-size:13px; }
        .doc-pericial-tabela th, .doc-pericial-tabela td { border:1px solid #d1d5db; padding:8px 10px; text-align:left; }
        .doc-pericial-tabela th { background:#f3f4f6; color:#111827; }
        .doc-pericial-assinatura { margin-top:40px; text-align:center; font-size:13px; color:#374151; }
        .doc-pericial-assinatura strong { display:block; margin-top:6px; color:#111827; }
        .doc-pericial-linha { width:240px; height:1px; background:#111827; margin:40px auto 8px auto; }
        .doc-pericial-ponto { border:1px solid #e2e8f0; border-radius:10px; padding:12px; margin-bottom:12px; background:#fcfdff; }
        .doc-pericial-ponto-header { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
        .doc-pericial-ponto-header strong { color:var(--cor-principal-escura); }
        .doc-pericial-bloco { border:1px dashed #cbd5e0; border-radius:8px; padding:10px; margin-top:8px; background:#fff; }
        .doc-pericial-bloco button { margin-top:8px; }
        .doc-pericial-preview img { max-width:100%; border:1px solid #e2e8f0; border-radius:6px; margin-top:8px; }
        @media (max-width: 768px) { .doc-pericial-grid, .doc-pericial-meta { grid-template-columns:1fr; } }
        .pdf-title { font-size: 16px; font-weight: bold; color: var(--cor-principal-escura); border-bottom: 1px solid var(--cor-borda); padding-bottom: 5px; margin-bottom: 10px; text-transform: uppercase; font-family: var(--font-titulo);}
        body.print-laudo .no-print, body.print-laudo .doc-pericial-topbar, body.print-laudo .doc-pericial-nav, body.print-laudo .doc-pericial-card, body.print-laudo .tab-content:not(#aba-laudo-pericial) { display: none !important; }
        body.print-laudo #aba-laudo-pericial { display: block !important; }
        body.print-laudo .doc-pericial-preview { display: block !important; border: none !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; background: white !important; }
        body.print-laudo .doc-pericial-section { background: #fcfafb !important; border: 1px solid var(--cor-borda) !important; }
        body.print-laudo .doc-pericial-section h5 { color: var(--cor-principal-escura) !important; }
        body.print-laudo .doc-pericial-tabela th { background: var(--cor-fundo-destaque) !important; color: var(--cor-principal-escura) !important; }
        body.print-laudo .doc-pericial-linha { background: var(--cor-principal-escura) !important; }
        body.print-esclarecimento .no-print, body.print-esclarecimento .doc-pericial-topbar, body.print-esclarecimento .doc-pericial-card, body.print-esclarecimento .doc-pericial-nav, body.print-esclarecimento .tab-content:not(#aba-esclarecimento-pericial) { display: none !important; }
        body.print-esclarecimento #aba-esclarecimento-pericial { display: block !important; }
        body.print-esclarecimento #esclarecimento-pdf-box { display: block !important; border: none !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; background: white !important; }
        body.print-esclarecimento .doc-pericial-section { background: #fcfafb !important; border: 1px solid var(--cor-borda) !important; }
        body.print-esclarecimento .doc-pericial-ponto { background: #fff !important; border: 1px solid var(--cor-borda) !important; }
        .texto-corrido { font-size: 13px; line-height: 1.6; color: #333; text-align: justify; margin-bottom: 20px; }
        .impug-pdf-ponto { margin-bottom: 35px; page-break-inside: auto; }
        .impug-pdf-titulo { font-weight: bold; font-size: 14px; margin-bottom: 10px; color: #000; text-transform: uppercase; border-bottom: 1px solid #eee; padding-bottom: 5px;}
        .impug-pdf-texto { font-size: 13px; text-align: justify; margin-bottom: 15px; line-height: 1.6; }
        
        /* =======================================
           ABA 8: HISTÓRICO / BANCO DE DADOS
           ======================================= */
        #aba-historico { background: #fff; padding: 20px; border-radius: 8px; border: 1px solid var(--cor-borda); box-shadow: 0 4px 15px rgba(26, 42, 68, 0.05); }
        .grid-historico { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
        .coluna-db { background: var(--cor-fundo-destaque); padding: 15px; border-radius: 8px; border: 1px solid var(--cor-borda); height: 500px; overflow-y: auto; }
        .coluna-db h3 { text-align: center; color: var(--cor-principal-escura); border-bottom: 2px solid var(--cor-dourado); padding-bottom: 10px; margin-top: 0; font-family: var(--font-titulo); font-size: 18px;}

        .card-doc-salvo { background: white; border: 1px solid #ddd; padding: 15px; border-radius: 6px; margin-bottom: 15px; border-left: 4px solid var(--cor-principal-escura); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
        .card-doc-salvo strong { display: block; font-size: 14px; color: var(--cor-principal-escura); margin-bottom: 5px; }
        .card-doc-salvo span { display: block; font-size: 12px; color: #666; margin-bottom: 10px; }
        .acoes-doc { display: flex; gap: 10px; }
        .btn-abrir-doc { flex: 1; background: var(--cor-dourado); color: white; border: none; padding: 6px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; transition: 0.2s;}
        .btn-abrir-doc:hover { background: #b08d4a; }
        .btn-excluir-doc { background: #fee2e2; color: #dc2626; border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
        .btn-excluir-doc:hover { background: #e53e3e; color: white; }

        /* IMPRESSÃO GERAL */
        @media print {
            @page { size: A4; margin: 15mm; } 
            body { background: white; padding: 0; margin: 0; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
            .main-header, .nav-tabs, .header, .no-print { display: none !important; }
            .tab-content:not(.active) { display: none !important; }
            
            #aba-orcamento.active #area-formulario { display: none !important; }
            #aba-orcamento.active #proposta-impressao { display: block !important; font-family: var(--font-corpo) !important; font-size: var(--font-size-pdf) !important; line-height: var(--lh-pdf) !important; color: #000 !important; text-align: justify !important; position: relative;}
            #aba-orcamento.active h1, #aba-orcamento.active h3 { font-family: var(--font-titulo) !important; color: var(--cor-principal-escura) !important; }
            .prop-header { text-align: center; margin-bottom: 25px; border-bottom: 2px solid var(--cor-principal-escura); padding-bottom: 10px;}
            .prop-header h1 { font-size: 16pt; margin-bottom: 5px; }
            .prop-header p { margin: 0; font-style: italic; color: var(--cor-texto-medio) !important; text-align: center !important;}
            .prop-section { margin-bottom: 20px; }
            .prop-section h3 { font-size: 14pt; font-weight: bold; border-bottom: 1px solid var(--cor-borda); padding-bottom: 3px; margin-bottom: 15px; }
            .row-linha { margin-bottom: 8px; display: flex; text-align: left !important;}
            .row-label { font-weight: bold; width: 160px; flex-shrink: 0; color: #000;}
            .row-valor { border-bottom: 1px dotted var(--cor-borda); flex-grow: 1; min-height: 18px; padding-left: 5px;}
            ul.verbas-limpas { columns: 2; margin-left: 20px; margin-top: 10px; margin-bottom: 15px; }
            ul.verbas-limpas li { margin-bottom: 4px; }
            .prop-termos ul { padding-left: 30px; margin-top: 5px; }
            .prop-termos p { margin-top: 10px; margin-bottom: 10px; }
            .box-pagamento { border: 1px solid var(--cor-borda) !important; background-color: var(--cor-fundo-destaque) !important; padding: 15px; margin-top: 10px; border-radius: 4px; text-align: left !important;}
            .evitar-quebra { page-break-inside: avoid; }
            .prop-assinaturas { margin-top: 40px; display: flex; justify-content: space-between; gap: 40px;}
            .assinatura-box { text-align: center !important; flex: 1; }
            .assinatura-linha { border-top: 1px solid var(--cor-texto-medio); margin-bottom: 5px; width: 100%; }
            .ass-flavia { font-family: var(--font-assinatura) !important; font-size: 28px !important; color: var(--cor-principal) !important; line-height: 1; margin-bottom: 5px; }

            #aba-relatorio.active #modoEdicaoRelatorio { display: none !important; }
            #aba-relatorio.active #modoVisRelatorio { display: block !important; }
            #aba-relatorio.active .folha-a4 { box-shadow: none; padding: 0; max-width: none; background: transparent !important; }
            .watermark { display: block !important; opacity: 0.12 !important; }

            body.print-fin #aba-financeiro { display: block !important; }
            body.print-fin #aba-financeiro { padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important; width: 100% !important; max-width: 100% !important; }
            body.print-fin .card { box-shadow: none; border: none; padding: 0; margin-bottom: 10px; }
            body.print-fin .table-container { display: block !important; }
            body.print-fin .table-container.no-print { display: none !important; }
            body.print-fin th { background-color: #eee !important; color: #000 !important; }
            body.print-fin td { border-bottom: 1px solid #ddd; }
            body.print-fin .header-print-fin { display: block !important; text-align: center; margin-bottom: 20px; border-bottom: 2px solid var(--cor-principal-escura); padding-bottom: 10px;}
            body.print-fin .fin-resumo-clientes { display: block !important; }
            body.print-fin .dashboard-cards { display: none !important; }
            body.print-fin #aba-financeiro .table-container { margin-top: 0 !important; }
            body.print-fin #aba-financeiro table { width: 100% !important; table-layout: fixed; font-size: 12px; }
            body.print-fin #aba-financeiro th,
            body.print-fin #aba-financeiro td { padding: 8px 6px !important; vertical-align: top; }
            body.print-fin #aba-financeiro tr { page-break-inside: avoid; }

            body.print-impug #aba-impugnacao { display: block !important; }
            body.print-impug .nav-tabs, body.print-impug .main-header, body.print-impug .no-print { display: none !important; }
            body.print-impug .pdf-wrapper { display: block !important; box-shadow: none; margin: 0; padding: 0; max-width: none; width: 100%; }
            
            #aba-historico { display: none !important; }
        }
        .header-print-fin { display: none; } 

.fin-resumo-clientes {
    background: #fff;
    border: 1px solid var(--cor-borda);
    border-top: 3px solid var(--cor-principal-escura);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
}

.fin-resumo-clientes h3 {
    margin: 0 0 10px 0;
    color: var(--cor-principal-escura);
    font-family: var(--font-titulo);
    font-size: 15px;
}

.fin-resumo-clientes-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

.fin-resumo-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.45;
}

.fin-resumo-item strong {
    color: #1e293b;
}

body.print-fin .fin-resumo-clientes {
    margin-top: 8px;
}
/* =========================================================
   AJUSTES FINAIS: MENU E CALENDÁRIO (Tamanho e Alinhamento)
   ========================================================= */

/* 1. Menu de abas em linha única */
.nav-tabs {
    display: flex;
    overflow-x: auto; /* permite rolar horizontalmente se necessário */
    white-space: nowrap; /* impede quebra em várias linhas */
    gap: 2px;
    padding-bottom: 5px;
}

.nav-tabs button {
    font-size: 13px !important;
    padding: 10px 12px !important; /* um tamanho menor */
    white-space: nowrap !important; /* mantém tudo numa linha */
}

/* Barra de rolagem discreta do menu */
.nav-tabs::-webkit-scrollbar { height: 4px; }
.nav-tabs::-webkit-scrollbar-thumb { background-color: var(--cor-borda); border-radius: 4px; }

/* 2. Caixas do calendário com altura fixa e rolagem interna */
#calendarioGrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 130px !important; /* altura fixa para todos os dias */
    gap: 8px;
}

.day-box {
    height: 100% !important; /* ocupa toda a altura definida pelo grid */
    min-height: unset !important; /* remove altura mínima que possa quebrar */
    max-height: 130px !important; /* trava o tamanho */
    overflow-y: auto !important; /* rolagem só interna, se necessário */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* barra de rolagem discreta nos quadrados do calendário */
.day-box::-webkit-scrollbar { width: 4px; }
.day-box::-webkit-scrollbar-track { background: transparent; }
.day-box::-webkit-scrollbar-thumb { background-color: #cbd5e0; border-radius: 4px; }
.day-box::-webkit-scrollbar-thumb:hover { background-color: #a0aec0; }

/* =========================================================
   IDENTIDADE VISUAL GERAL — FLÁVIA CALCULISTA
   Paleta Unificada: Azul Marinho (#1a2a44)
   ========================================================= */
:root {
    --cor-principal: #1a2a44;
    --cor-principal-clara: #3d5a7d;
    --cor-principal-escura: #1a2a44;
    --cor-fundo: #f8f9fc;
    --cor-texto-escuro: #1a2a44;
    --cor-texto-medio: #4a5568;
    --cor-texto-claro: #718096;
    --cor-borda: #d4c5b9;
    --cor-fundo-destaque: #fdfafb;
    --cor-dourado: #c5a059;
    --azul-lucro: #a85f6c;
}

body.agenda-ativa {
    --cor-principal: #1a2a44;
    --cor-principal-clara: #3d5a7d;
    --cor-principal-escura: #1a2a44;
    --cor-fundo: #f8f9fc;
    --cor-texto-escuro: #1a2a44;
    --cor-texto-medio: #4a5568;
    --cor-texto-claro: #718096;
    --cor-borda: #d4c5b9;
    --cor-fundo-destaque: #fdfafb;
    --cor-dourado: #c5a059;
    --azul-lucro: #a85f6c;
}

.main-header {
    background: linear-gradient(135deg, #1a2a44 0%, #1a2a44 58%, #3d5a7d 100%);
    border-bottom-color: #c5a059;
    box-shadow: 0 7px 22px rgba(89, 53, 62, .16);
}
.nav-tabs {
    background: #3b2a34;
    border-bottom-color: #b8925f;
}
body.agenda-ativa .main-header { background: #1a2a44; border-bottom-color: #c5a059; box-shadow: none; }
body.agenda-ativa .nav-tabs { background: #1a2a44; border-bottom-color: #c5a059; }

.brand-logo { display:block; width:auto; object-fit:contain; }
.brand-logo-login { max-width:150px; max-height:92px; margin:0 auto 12px; }
.brand-logo-header { max-width:128px; max-height:72px; margin:0 auto 8px; filter:drop-shadow(0 3px 8px rgba(0,0,0,.15)); }
.main-header h1 { font-size:26px; }

#tela-login {
    background: radial-gradient(circle at top, #fff 0%, #fbf8f5 48%, #f1e6df 100%) !important;
}
#tela-login .card {
    border-top-color:#1a2a44 !important;
    box-shadow:0 18px 50px rgba(26,42,68,.14);
}

.btn-primario { background-color:#1a2a44; }
.btn-primario:hover { background-color:#c5a059; transform:translateY(-1px); }
th { background-color:#3d5a7d; }
.card { border-top-color:#c9aa7b; }

@media (max-width: 768px) {
    .brand-logo-header { max-width:104px; max-height:58px; }
    .main-header h1 { font-size:22px; }
}

    
/* V8.2 - Financeiro separado */
#aba-despesas .table-container, #aba-gestao-financeira #gestao-financeira-painel {box-shadow:0 8px 24px rgba(27,41,64,.06);}
#aba-despesas .header h1, #aba-gestao-financeira .header h1 {color:#1b2940;}
#aba-despesas .btn-primario {background:#b76e79!important;}

/* V8.3 — identidade visual confortável + Rose Gold */
:root { --rose-gold:#b76e79; --rose-gold-escuro:#8f5660; --rose-gold-claro:#ead1d5; --creme:#fbf7f1; }
body, input, select, textarea, button, table { font-family:'Segoe UI', Arial, sans-serif !important; }
h1,h2,h3,h4,.card-title,.logo-text { font-family:'Segoe UI', Arial, sans-serif !important; letter-spacing:0 !important; }
.nav-tabs button.active { color:#fff !important; border-bottom:3px solid var(--rose-gold) !important; background:rgba(183,110,121,.18) !important; }
.btn-primario, .btn-acao { border-color:var(--rose-gold); }
.card { border-color:#dfc8c2; }
.card-title { color:var(--rose-gold-escuro) !important; }
#aba-despesas .table-container, #aba-gestao-financeira #gestao-financeira-painel { border-top:3px solid var(--rose-gold) !important; }
.tempo-execucao-box { border:1px solid var(--rose-gold-claro); background:#fffaf8; border-radius:8px; padding:8px 10px; }
.tempo-status { font-size:11px; color:#6b625b; margin-top:4px; }


/* V8.6 - identidade documental de impressão robusta */
.doc-print-watermark{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:62%!important;max-width:520px!important;height:auto!important;opacity:.055!important;z-index:0!important;pointer-events:none!important;filter:none!important;}
#proposta-impressao,#modoVisRelatorio,#impugnacao-pdf-box,.relatorio-cliente-print{position:relative!important;}
#proposta-impressao>*:not(.watermark),#modoVisRelatorio>*:not(.watermark),#impugnacao-pdf-box>*:not(.doc-print-watermark){position:relative;z-index:1;}
#proposta-impressao>.watermark,#modoVisRelatorio>.watermark{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:62%!important;max-width:520px!important;height:auto!important;opacity:.055!important;z-index:0!important;pointer-events:none!important;}
.relatorio-fin-watermark{display:none;}
@media print{
  #proposta-impressao>.watermark,#modoVisRelatorio>.watermark,.doc-print-watermark{display:block!important;opacity:.055!important;z-index:0!important;}
  body.print-fin #aba-financeiro{position:relative!important;background:#fff!important;}
  body.print-fin .relatorio-fin-watermark{display:block!important;position:fixed!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:62%!important;max-width:520px!important;opacity:.055!important;z-index:0!important;pointer-events:none!important;}
  body.print-fin #aba-financeiro>*:not(.relatorio-fin-watermark){position:relative!important;z-index:1!important;}
  body.print-fin th{background:#fff!important;color:#1b2940!important;border-bottom:1.5px solid #c9958f!important;}
  body.print-fin td{background:transparent!important;}
  body.print-fin .header-print-fin{border-bottom:1.5px solid #c9958f!important;}
  body.print-fin .relatorio-print-topo{display:none!important;}
  body.print-fin::after{content:"Porque cálculo é número, mas também é decisão!"!important;}
  body.print-impug #impugnacao-pdf-box{position:relative!important;background:#fff!important;}
  body.print-impug #impugnacao-pdf-box .doc-print-watermark{display:block!important;}
}

/* V8.7 — padrão mestre de impressão: clean como o Parecer */
@media print {
  #proposta-impressao, #modoVisRelatorio, body.print-fin #aba-financeiro, #impugnacao-pdf-box,
  #proposta-impressao .folha-a4, #modoVisRelatorio .folha-a4 {
    background:#fff !important; background-image:none !important; box-shadow:none !important;
  }
  #proposta-impressao .prop-section, #proposta-impressao .box-pagamento,
  #modoVisRelatorio .doc-table, #modoVisRelatorio .doc-section-title,
  body.print-fin #aba-financeiro .table-container, body.print-fin #aba-financeiro table,
  body.print-fin #aba-financeiro th, body.print-fin #aba-financeiro td {
    background:transparent !important; background-image:none !important; box-shadow:none !important;
  }
  #proposta-impressao>.watermark, #modoVisRelatorio>.folha-a4>.watermark,
  #impugnacao-pdf-box .doc-print-watermark, body.print-fin .relatorio-fin-watermark {
    display:block !important; opacity:.06 !important; filter:none !important;
  }
  /* Relatório de honorários para cliente: só Data, Processo/Escritório, Serviço e Valor Total. */
  body.print-fin #aba-financeiro table th:nth-child(4), body.print-fin #aba-financeiro table td:nth-child(4),
  body.print-fin #aba-financeiro table th:nth-child(6), body.print-fin #aba-financeiro table td:nth-child(6),
  body.print-fin #aba-financeiro table th:nth-child(7), body.print-fin #aba-financeiro table td:nth-child(7),
  body.print-fin #aba-financeiro table th:nth-child(8), body.print-fin #aba-financeiro table td:nth-child(8) { display:none !important; }
  body.print-fin #aba-financeiro table { table-layout:auto !important; }
  body.print-fin #aba-financeiro th { color:#1b2940 !important; border-bottom:1.5px solid #c9958f !important; }
}


/* ===== estilo original 2 ===== */

:root{--cor-principal:#1b2940!important;--cor-principal-clara:#44546b!important;--cor-principal-escura:#101b2d!important;--cor-fundo:#f3ede3!important;--cor-branco:#fffaf2!important;--cor-texto-escuro:#253142!important;--cor-texto-medio:#596474!important;--cor-borda:#dfd1bd!important;--cor-fundo-destaque:#faf4e9!important;--cor-dourado:#b5945e!important;}
html,body{background:#f3ede3!important;color:#4f5b6b!important;}
#sistema-principal,.container{background:#f3ede3!important;}
.main-header{background:linear-gradient(135deg,#101b2d,#213653)!important;border-bottom:3px solid #b5945e!important;box-shadow:0 4px 18px rgba(16,27,45,.14)!important;}
.main-header h1,.main-header .logo-text{color:#fffaf2!important}.main-header p{color:#e4d8c7!important}
.nav-tabs{background:#1b2940!important;border-bottom:1px solid #b5945e!important;padding:4px 10px 6px!important;}
.nav-tabs button{background:transparent!important;color:#e8dece!important;border-radius:8px 8px 0 0!important;}
.nav-tabs button.active{background:#f3ede3!important;color:#1b2940!important;border-top:2px solid #b5945e!important;}
.card,fieldset,.form-section,.table-container,.fin-resumo-clientes,.client-card{background:#fffaf2!important;border-color:#dfd1bd!important;box-shadow:0 5px 18px rgba(49,39,25,.055)!important;}
input,select,textarea{background:#fffdf8!important;border-color:#d9cbb7!important;color:#253142!important;}
input:focus,select:focus,textarea:focus{border-color:#b5945e!important;box-shadow:0 0 0 3px rgba(181,148,94,.13)!important;outline:none!important;}
table{background:#fffaf2!important} th{background:#e9decd!important;color:#26364e!important} td{border-color:#eadfce!important}
.btn-primario{background:#1b2940!important;color:#fffaf2!important}.btn-secundario{background:#eee4d5!important;color:#253142!important;border-color:#d7c5ab!important}
h1,h2,h3,.header h1{color:#1b2940!important}


/* ===== estilo original 3 ===== */

#gestao-financeira-painel .card{background:#fffaf4;border-color:#e4c7c0}#gestao-financeira-painel .card-value{color:#1b2940}.grid-4:has(#desp-natureza){grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important}


/* ===== estilo original 4 ===== */

:root{--rose-gold:#b76e79;--rose-gold-escuro:#8f5660;--rose-gold-suave:#c9958f;--marinho-doc:#1b2940;}
/* Assinatura oficial */
.ass-flavia{color:var(--rose-gold)!important;font-family:'Great Vibes',cursive!important;font-size:31px!important;}
.doc-assinatura .assinatura-linha,.assinatura-box .assinatura-linha{border-top:1px solid var(--rose-gold)!important;}
/* Marca d'água real: sempre acima do papel e atrás do conteúdo */
#proposta-impressao,#modoVisRelatorio .folha-a4,#impugnacao-pdf-box,body.print-fin #aba-financeiro{position:relative!important;background:#fff!important;overflow:visible!important;}
#proposta-impressao>.watermark,#modoVisRelatorio .folha-a4>.watermark,#impugnacao-pdf-box>.doc-print-watermark,.relatorio-fin-watermark{
 position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;
 width:58%!important;max-width:470px!important;height:auto!important;opacity:.065!important;z-index:1!important;pointer-events:none!important;filter:none!important;
}
#proposta-impressao>*:not(.watermark),#modoVisRelatorio .folha-a4>*:not(.watermark),#impugnacao-pdf-box>*:not(.doc-print-watermark),body.print-fin #aba-financeiro>*:not(.relatorio-fin-watermark){position:relative!important;z-index:2!important;}
/* Documento clean: sem fundos decorativos, apenas branco + marinho + rose gold */
.doc-header,.pdf-header,.prop-header{border-bottom-color:var(--rose-gold-suave)!important;}
.doc-section-title{background:#fff!important;color:var(--marinho-doc)!important;border:0!important;border-left:4px solid var(--rose-gold)!important;border-bottom:1px solid #ead1d5!important;padding:6px 9px!important;}
.doc-table th{background:#fff!important;color:var(--marinho-doc)!important;border-color:#e7ddd9!important;}
.doc-table td,.doc-list-box,.doc-item{background:transparent!important;border-color:#eadfdb!important;}
#modoVisRelatorio .folha-a4>div[style*="background: #fafcff"]{background:#fff!important;border-color:#eadfdb!important;}
.prop-section h3,.pdf-title{border-bottom-color:#ead1d5!important;color:var(--marinho-doc)!important;}
.box-pagamento{background:#fff!important;border-color:#ead1d5!important;}
/* Honorários: visual de documento, sem status e sem fundos coloridos */
body.print-fin .header-print-fin{border-bottom:1.5px solid var(--rose-gold)!important;}
body.print-fin .relatorio-print-titulo,body.print-fin .relatorio-print-cliente{color:var(--rose-gold-escuro)!important;}
body.print-fin th{background:#fff!important;color:var(--marinho-doc)!important;border:0!important;border-bottom:1.5px solid var(--rose-gold)!important;}
body.print-fin td{background:transparent!important;border-bottom:1px solid #eadfdb!important;}
body.print-fin .fin-status-pill,body.print-fin .status{display:none!important;}
/* Rodapé comum */
.doc-footer-flavia{display:none;}
@media print{
 @page{size:A4;margin:15mm 14mm 18mm;}
 html,body{background:#fff!important;}
 #proposta-impressao,#modoVisRelatorio .folha-a4,#impugnacao-pdf-box,body.print-fin #aba-financeiro{background:#fff!important;background-image:none!important;box-shadow:none!important;}
 #proposta-impressao>.watermark,#modoVisRelatorio .folha-a4>.watermark,#impugnacao-pdf-box>.doc-print-watermark,body.print-fin .relatorio-fin-watermark{display:block!important;opacity:.065!important;z-index:1!important;}
 body.print-fin .relatorio-fin-watermark{position:fixed!important;}
 body.print-fin .card,body.print-fin .table-container{background:#fff!important;box-shadow:none!important;border:0!important;}
 body.print-fin table th:nth-child(4),body.print-fin table td:nth-child(4),body.print-fin table th:nth-child(6),body.print-fin table td:nth-child(6),body.print-fin table th:nth-child(7),body.print-fin table td:nth-child(7),body.print-fin table th:nth-child(8),body.print-fin table td:nth-child(8){display:none!important;}
 body.print-fin::after{content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:var(--rose-gold-escuro)!important;border-top:1px solid #ead1d5!important;padding-top:7px!important;margin-top:20px!important;font:10px 'Segoe UI',Arial,sans-serif!important;}
 #proposta-impressao::after,#modoVisRelatorio .folha-a4::after,#impugnacao-pdf-box::after{content:"Porque cálculo é número, mas também é decisão!";display:block;text-align:center;color:var(--rose-gold-escuro);border-top:1px solid #ead1d5;padding-top:7px;margin-top:22px;font:10px 'Segoe UI',Arial,sans-serif;position:relative;z-index:2;}
}


/* ===== estilo original 5 ===== */

@media print {
  body.print-fin #aba-financeiro table th:nth-child(3),
  body.print-fin #aba-financeiro table td:nth-child(3),
  body.print-fin #aba-financeiro table th:nth-child(5),
  body.print-fin #aba-financeiro table td:nth-child(5),
  body.print-fin #aba-financeiro table th:nth-child(6),
  body.print-fin #aba-financeiro table td:nth-child(6),
  body.print-fin #aba-financeiro table th:nth-child(7),
  body.print-fin #aba-financeiro table td:nth-child(7) { display:none !important; }
  body.print-fin #aba-financeiro table th:nth-child(2),
  body.print-fin #aba-financeiro table td:nth-child(2),
  body.print-fin #aba-financeiro table th:nth-child(4),
  body.print-fin #aba-financeiro table td:nth-child(4) { text-align:center !important; }
  body.print-fin .relatorio-print-titulo { color:#b56f7c !important; text-align:center !important; }
  body.print-fin #aba-financeiro .table-container > h3 { color:#b56f7c !important; background:transparent !important; border-bottom:1px solid #d8a7ae !important; }
}


/* ===== estilo original 6 ===== */

/* Gestão Financeira V9.1 — composição mais leve */
#gestao-financeira-painel.gf-shell{margin:20px 0;background:transparent!important;border:0!important;box-shadow:none!important}
.gf-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;background:#fff;padding:24px 28px;border:1px solid #eadfd9;border-radius:16px;border-left:4px solid var(--rose-gold);box-shadow:0 8px 26px rgba(27,41,64,.045)}
.gf-eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--rose-gold-escuro);font-weight:700}.gf-hero h3{margin:5px 0 4px;font-size:24px}.gf-hero p{margin:0;color:#746a67;font-size:13px}.gf-hero-number{text-align:right;min-width:230px}.gf-hero-number span,.gf-kpi span,.gf-ticket span{display:block;font-size:11px;color:#756b68;margin-bottom:6px}.gf-hero-number strong{font-size:27px;color:#1b2940}
.gf-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}.gf-kpi{background:#fff;padding:17px 18px;border:1px solid #eadfd9;border-radius:13px}.gf-kpi strong{display:block;font-size:19px;color:#1b2940}.gf-kpi-accent{border-top:3px solid var(--rose-gold)}
.gf-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:14px}.gf-panel{background:#fff;border:1px solid #eadfd9;border-radius:14px;padding:20px}.gf-panel h4{margin:0 0 15px;color:#1b2940;font-size:15px;border-bottom:1px solid #f0e7e2;padding-bottom:10px}.gf-fields{display:grid;grid-template-columns:1fr;gap:4px}.gf-fields-2{grid-template-columns:1fr 1fr;gap:4px 12px}.gf-panel .input-group{margin-bottom:10px}.gf-panel input{background:#fff!important}.gf-ticket{margin-top:5px;padding:13px 15px;background:#fbf7f4;border-radius:10px;border-left:3px solid var(--rose-gold)}.gf-ticket strong{font-size:18px;color:#1b2940}.gf-ticket small{display:block;margin-top:3px;color:#857a76}.gf-note{font-size:11px;color:#817672;margin:12px 4px 0}
@media(max-width:900px){.gf-kpis{grid-template-columns:1fr 1fr}.gf-grid{grid-template-columns:1fr}.gf-hero{align-items:flex-start}.gf-hero-number{text-align:left}.gf-fields-2{grid-template-columns:1fr}}
/* Relatório de Honorários: Processo + saldo; cada trabalho mostra data e valor cobrado */
@media print{
 body.print-fin #aba-financeiro .table-container{border:0!important;margin-top:22px!important}
 body.print-fin #aba-financeiro .table-container>h3{background:transparent!important;color:var(--rose-gold-escuro)!important;border-bottom:1px solid var(--rose-gold-suave)!important;padding:10px 0!important;font-size:16px!important}
 body.print-fin #aba-financeiro table{width:100%!important;border-collapse:collapse!important}
 body.print-fin #aba-financeiro thead th{display:none!important}
 body.print-fin #aba-financeiro thead th:nth-child(1),body.print-fin #aba-financeiro thead th:nth-child(2),body.print-fin #aba-financeiro thead th:nth-child(4){display:table-cell!important;background:#fff!important;color:#1b2940!important;border-bottom:1px solid #d9b5b7!important;padding:8px 10px!important}
 body.print-fin #aba-financeiro thead th:nth-child(1){width:58%!important;text-align:left!important}body.print-fin #aba-financeiro thead th:nth-child(2){width:20%!important;text-align:center!important}body.print-fin #aba-financeiro thead th:nth-child(4){width:22%!important;text-align:center!important}
 body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td{display:none!important}
 body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(1),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(2),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(4){display:table-cell!important;background:transparent!important;padding:9px 10px!important;border-bottom:1px solid #eee3df!important}
 body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(2),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(4){text-align:center!important}
 body.print-fin #aba-financeiro .fin-processo-header td{display:table-cell!important;background:#fbf7f4!important;border-top:1.5px solid var(--rose-gold)!important;border-bottom:1px solid #ead7d2!important;padding:10px 12px!important}
 body.print-fin #aba-financeiro .fin-processo-header .fin-saldo-processo{color:var(--rose-gold-escuro)!important;white-space:nowrap!important}
 body.print-fin .relatorio-fin-watermark{opacity:.045!important}
}


/* ===== estilo original 7 ===== */

:root{--doc-navy:#1a2a44;--doc-rose:#b76e79;--doc-rose-soft:#d9b5b7;--doc-champagne:#f8f2ea;--doc-line:#ded4ce;}
/* ORÇAMENTO: recuperar a linguagem visual do arquivo de referência, sem alterar lógica */
#proposta-impressao{font-family:'Segoe UI',Arial,sans-serif!important;color:#222!important;background:#fff!important;max-width:850px;margin:0 auto;}
#proposta-impressao .prop-header{text-align:center!important;margin-bottom:25px!important;border-bottom:2px solid var(--doc-navy)!important;padding-bottom:12px!important;}
#proposta-impressao .prop-header .img-logo{max-height:72px!important;width:auto!important;margin:0 auto 12px!important;}
#proposta-impressao .prop-header h1{font-size:16pt!important;line-height:1.35!important;color:var(--doc-navy)!important;margin:0 0 6px!important;font-weight:700!important;}
#proposta-impressao .prop-header p{margin:0!important;color:#596474!important;font-style:italic!important;text-align:center!important;}
#proposta-impressao .prop-section{margin:0 0 22px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;}
#proposta-impressao .prop-section h3{font-size:13pt!important;color:var(--doc-navy)!important;border:0!important;border-bottom:1px solid var(--doc-line)!important;padding:0 0 5px!important;margin:0 0 14px!important;font-weight:700!important;}
#proposta-impressao .row-linha{display:flex!important;margin-bottom:8px!important;align-items:flex-end!important;}
#proposta-impressao .row-label{width:160px!important;flex:0 0 160px!important;font-weight:700!important;color:#222!important;}
#proposta-impressao .row-valor{flex:1!important;min-height:18px!important;padding-left:6px!important;border-bottom:1px dotted #b9aaa4!important;color:#222!important;}
#proposta-impressao .box-pagamento{background:#fff!important;border:1px solid var(--doc-line)!important;border-left:3px solid var(--doc-rose)!important;border-radius:2px!important;padding:13px 15px!important;}
#proposta-impressao .prop-assinaturas{margin-top:42px!important;display:flex!important;gap:42px!important;justify-content:space-between!important;}
#proposta-impressao .assinatura-box{flex:1!important;text-align:center!important;}
#proposta-impressao .assinatura-linha{border-top:1px solid var(--doc-rose)!important;}
#proposta-impressao .ass-flavia{color:var(--doc-rose)!important;}
#proposta-impressao>.watermark{opacity:.05!important;max-width:450px!important;}
/* HONORÁRIOS: mesma família do Orçamento/Parecer */
body.print-fin #aba-financeiro{font-family:'Segoe UI',Arial,sans-serif!important;color:#222!important;background:#fff!important;}
body.print-fin .header-print-fin{display:block!important;text-align:center!important;border-bottom:2px solid var(--doc-navy)!important;padding:0 0 14px!important;margin:0 0 24px!important;}
body.print-fin .relatorio-print-topo{display:block!important;margin:0 0 8px!important;}
body.print-fin .relatorio-print-logo{width:auto!important;height:68px!important;max-width:120px!important;margin:0 auto 8px!important;object-fit:contain!important;}
body.print-fin .relatorio-print-topo h2{display:none!important;}
body.print-fin .relatorio-print-sub{display:none!important;}
body.print-fin .relatorio-print-titulo{font-size:16pt!important;font-weight:700!important;color:var(--doc-navy)!important;margin:0 0 5px!important;letter-spacing:0!important;}
body.print-fin .relatorio-print-cliente{font-size:12pt!important;font-weight:600!important;color:var(--doc-rose)!important;margin:0 0 6px!important;}
body.print-fin #print-fin-periodo{font-size:10.5pt!important;color:#596474!important;margin:0!important;text-align:center!important;}
body.print-fin #aba-financeiro .table-container{border:0!important;box-shadow:none!important;margin:20px 0 0!important;background:#fff!important;}
body.print-fin #aba-financeiro .table-container>h3{font-size:13pt!important;color:var(--doc-navy)!important;border:0!important;border-bottom:1px solid var(--doc-line)!important;padding:0 0 6px!important;margin:0 0 10px!important;background:transparent!important;}
body.print-fin #aba-financeiro table{width:100%!important;border-collapse:collapse!important;table-layout:fixed!important;font-size:10.5pt!important;}
body.print-fin #aba-financeiro thead th{display:none!important;}
body.print-fin #aba-financeiro thead th:nth-child(1),body.print-fin #aba-financeiro thead th:nth-child(2),body.print-fin #aba-financeiro thead th:nth-child(4){display:table-cell!important;background:#fff!important;color:var(--doc-navy)!important;border:0!important;border-bottom:1.5px solid var(--doc-rose)!important;padding:8px 10px!important;}
body.print-fin #aba-financeiro thead th:nth-child(1){width:58%!important;text-align:left!important}body.print-fin #aba-financeiro thead th:nth-child(2){width:20%!important;text-align:center!important}body.print-fin #aba-financeiro thead th:nth-child(4){width:22%!important;text-align:center!important}
body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td{display:none!important;}
body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(1),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(2),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(4){display:table-cell!important;background:#fff!important;border:0!important;border-bottom:1px dotted #cbbdb7!important;padding:9px 10px!important;}
body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(2),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(4){text-align:center!important;}
body.print-fin #aba-financeiro .fin-processo-header td{display:table-cell!important;background:#fff!important;border:0!important;border-top:1.5px solid var(--doc-rose)!important;border-bottom:1px solid var(--doc-line)!important;padding:11px 10px!important;}
body.print-fin #aba-financeiro .fin-processo-header td>div{align-items:flex-start!important;gap:15px!important;}
body.print-fin #aba-financeiro .fin-processo-header .fin-saldo-processo{color:var(--doc-rose)!important;font-weight:800!important;white-space:nowrap!important;}
body.print-fin .relatorio-fin-watermark{opacity:.05!important;max-width:450px!important;}
body.print-fin::after{content:"Porque cálculo é número, mas também é decisão!"!important;color:#8f5660!important;border-top:1px solid #ded4ce!important;margin-top:24px!important;padding-top:8px!important;font-size:10px!important;text-align:center!important;}
@media print{
 @page{size:A4;margin:15mm;}
 #proposta-impressao,#impugnacao-pdf-box,body.print-fin #aba-financeiro{background:#fff!important;box-shadow:none!important;}
}


/* ===== estilo original 8 ===== */

:root{
 --fp-navy:#1d304d;
 --fp-rose:#b76e79;
 --fp-rose-dark:#955d67;
 --fp-cream:#f7f0e7;
 --fp-line:#e4d7d0;
}

/* LOGO DO SISTEMA: tenta exibir a logo real sem alterar a estrutura */
header img[src="logo.png"], .main-header img[src="logo.png"], img.logo-sistema{
  display:inline-block!important;height:58px!important;width:auto!important;object-fit:contain!important;
}

/* RECEITA: volta a dar protagonismo aos dois indicadores; avulsa vira ação secundária */
#aba-financeiro .receita-resumo-grid{
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto!important;
  gap:18px!important;
  align-items:stretch!important;
  max-width:900px!important;
}
#aba-financeiro .receita-kpi{
  background:#fffaf4!important;
  border:1px solid #eadccf!important;
  border-top:3px solid #d9c2a3!important;
  box-shadow:0 5px 14px rgba(29,48,77,.06)!important;
  border-radius:9px!important;
  min-height:118px!important;
  padding:22px 24px!important;
}
#aba-financeiro .receita-kpi .card-title{
  color:var(--fp-rose-dark)!important;font-size:15px!important;font-weight:700!important;
  padding-bottom:8px!important;border-bottom:1px solid #dfcbbd!important;
}
#aba-financeiro .receita-kpi .card-value{font-size:26px!important;margin-top:20px!important;}
#aba-financeiro .receita-avulsa-atalho{
  align-self:center!important;
  width:auto!important;min-width:180px!important;min-height:44px!important;
  padding:10px 15px!important;border-radius:7px!important;
  border:1px solid #d7c8be!important;border-top:1px solid #d7c8be!important;
  background:#fff!important;box-shadow:none!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  color:var(--fp-navy)!important;
}
#aba-financeiro .receita-avulsa-atalho:hover{background:#fbf5ef!important;border-color:var(--fp-rose)!important;}
#aba-financeiro .receita-avulsa-mais{font-size:18px!important;color:var(--fp-rose)!important;}
#aba-financeiro .receita-avulsa-atalho strong{font-size:12px!important;white-space:nowrap!important;}
#aba-financeiro .receita-avulsa-atalho small{display:none!important;}
#aba-financeiro .receita-avulsa-form{
  max-width:900px!important;background:#fff!important;border:1px solid #e5d9d2!important;
  border-left:3px solid var(--fp-rose)!important;border-top:1px solid #e5d9d2!important;
  box-shadow:none!important;
}

/* ORÇAMENTO NA PRÓPRIA TELA: linguagem visual do Parecer */
#proposta-impressao{
  position:relative!important;background:#fff!important;background-image:none!important;
  border:0!important;border-radius:0!important;box-shadow:0 8px 24px rgba(29,48,77,.07)!important;
  color:#292d33!important;
}
#proposta-impressao .prop-header{
  background:transparent!important;border:0!important;border-bottom:1px solid var(--fp-rose)!important;
  padding:18px 20px 15px!important;margin-bottom:26px!important;
}
#proposta-impressao .doc-brand-row{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:18px!important;}
#proposta-impressao .doc-brand-left{display:flex!important;align-items:center!important;gap:13px!important;}
#proposta-impressao .img-logo{display:block!important;height:62px!important;width:auto!important;max-width:100px!important;object-fit:contain!important;}
#proposta-impressao .doc-brand-name{display:block!important;font-size:21px!important;font-weight:500!important;color:var(--fp-navy)!important;}
#proposta-impressao .doc-brand-sub{display:block!important;font-size:10px!important;color:#777!important;margin-top:3px!important;}
#proposta-impressao .prop-header h1{
  margin:24px 20px 0!important;text-align:center!important;color:var(--fp-navy)!important;
  font-size:15px!important;line-height:1.4!important;
}
#proposta-impressao .prop-header p{font-size:10px!important;color:#666!important;}
#proposta-impressao .prop-section{padding:0 20px!important;margin-bottom:25px!important;background:transparent!important;border:0!important;}
#proposta-impressao .prop-section h3{
  color:var(--fp-rose-dark)!important;font-size:12px!important;background:transparent!important;
  border:0!important;border-bottom:1px solid var(--fp-line)!important;padding:0 0 7px!important;
}
#proposta-impressao .row-valor{border-bottom:1px dotted #cfc1ba!important;}
#proposta-impressao .box-pagamento{
  background:#fff!important;border:1px solid var(--fp-line)!important;border-left:2px solid var(--fp-rose)!important;box-shadow:none!important;
}
#proposta-impressao>.watermark{
  display:block!important;position:absolute!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;width:48%!important;max-width:390px!important;
  opacity:.04!important;z-index:0!important;pointer-events:none!important;
}
#proposta-impressao>*:not(.watermark){position:relative!important;z-index:2!important;}
#proposta-impressao .ass-flavia{color:var(--fp-rose)!important;}
#proposta-impressao .assinatura-linha{border-color:var(--fp-rose)!important;}

/* Mobile */
@media(max-width:760px){
  body{min-width:0!important;overflow-x:hidden!important;}
  .container,.content,.tab-content{max-width:100%!important;width:100%!important;box-sizing:border-box!important;padding-left:10px!important;padding-right:10px!important;}
  .nav-tabs{display:flex!important;overflow-x:auto!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;}
  .nav-tabs button,.tab-btn{flex:0 0 auto!important;}
  #aba-financeiro .receita-resumo-grid{grid-template-columns:1fr!important;max-width:none!important;}
  #aba-financeiro .receita-avulsa-atalho{justify-self:start!important;}
  .table-container{overflow-x:auto!important;}
}

/* IMPRESSÃO: isola o documento do sistema */
@media print{
  @page{size:A4;margin:16mm 17mm 18mm;}
  body{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;}

  /* esconde chrome do sistema */
  body.print-fin header, body.print-fin nav, body.print-fin .main-header, body.print-fin .nav-tabs,
  body.print-fin .tabs, body.print-fin .topbar, body.print-fin .sidebar,
  body.print-fin #aba-financeiro>h2, body.print-fin #aba-financeiro>.filters,
  body.print-fin #aba-financeiro .filtros-financeiro,
  body.print-fin #aba-financeiro .receita-resumo-grid,
  body.print-fin #aba-financeiro #bloco-receita-avulsa,
  body.print-fin #aba-financeiro .no-print{
    display:none!important;
  }

  body.print-fin{background:#fff!important;margin:0!important;padding:0!important;}
  body.print-fin .container, body.print-fin .content, body.print-fin .tab-content{
    width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;
  }
  body.print-fin #aba-financeiro{
    display:block!important;position:relative!important;width:100%!important;max-width:none!important;
    margin:0!important;padding:0!important;background:#fff!important;border:0!important;box-shadow:none!important;
    font-family:"Segoe UI",Arial,sans-serif!important;color:#292d33!important;
  }

  body.print-fin .header-print-fin{
    display:block!important;margin:0 0 25px!important;padding:0 0 14px!important;
    border:0!important;border-bottom:1px solid var(--fp-rose)!important;background:#fff!important;
  }
  body.print-fin .relatorio-print-topo{display:flex!important;align-items:center!important;gap:13px!important;margin-bottom:22px!important;}
  body.print-fin .relatorio-print-logo{display:block!important;height:60px!important;width:auto!important;max-width:95px!important;object-fit:contain!important;}
  body.print-fin .relatorio-print-topo h2{margin:0!important;color:var(--fp-navy)!important;font-size:20px!important;font-weight:500!important;}
  body.print-fin .relatorio-print-sub{font-size:9.5px!important;color:#777!important;}
  body.print-fin .relatorio-print-titulo{font-size:14.5px!important;color:var(--fp-navy)!important;text-align:center!important;margin-bottom:6px!important;}
  body.print-fin .relatorio-print-cliente{font-size:10.5px!important;color:var(--fp-rose-dark)!important;text-align:center!important;margin-bottom:4px!important;}
  body.print-fin #print-fin-periodo{font-size:9.5px!important;color:#666!important;text-align:center!important;}

  body.print-fin #aba-financeiro .table-container{background:#fff!important;border:0!important;box-shadow:none!important;margin:0!important;padding:0!important;}
  body.print-fin #aba-financeiro .table-container>h3{
    color:var(--fp-rose-dark)!important;background:#fff!important;border:0!important;
    border-bottom:1px solid var(--fp-line)!important;font-size:11.5px!important;padding:0 0 6px!important;margin:0 0 12px!important;
  }
  body.print-fin #aba-financeiro table{width:100%!important;border-collapse:collapse!important;font-size:10px!important;}
  body.print-fin #aba-financeiro thead th{
    background:#fff!important;color:var(--fp-navy)!important;border:0!important;border-bottom:1px solid var(--fp-rose)!important;padding:6px 7px!important;
  }
  body.print-fin #aba-financeiro tbody td{
    background:#fff!important;border:0!important;border-bottom:1px dotted #d3c6c1!important;padding:7px!important;
  }
  body.print-fin #aba-financeiro .fin-processo-header td{
    background:#fff!important;border:0!important;border-top:1px solid var(--fp-rose)!important;border-bottom:1px solid var(--fp-line)!important;padding:9px 7px!important;
  }
  body.print-fin #aba-financeiro .fin-saldo-processo{color:var(--fp-rose-dark)!important;font-weight:700!important;}
  body.print-fin .relatorio-fin-watermark{
    display:block!important;position:fixed!important;left:50%!important;top:50%!important;
    transform:translate(-50%,-50%)!important;width:48%!important;max-width:390px!important;
    opacity:.04!important;z-index:0!important;pointer-events:none!important;
  }
  body.print-fin #aba-financeiro>*:not(.relatorio-fin-watermark){position:relative!important;z-index:2!important;}

  /* orçamento: somente o documento */
  body.print-proposta header, body.print-proposta nav, body.print-proposta .main-header,
  body.print-proposta .nav-tabs, body.print-proposta .tabs, body.print-proposta .topbar,
  body.print-proposta .sidebar, body.print-proposta .no-print{display:none!important;}
  body.print-proposta #proposta-impressao{
    box-shadow:none!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
  }
  body.print-proposta #proposta-impressao>.watermark{position:fixed!important;}
}


/* ===== estilo original 9 ===== */

:root{
 --v97-navy:#1d304d;
 --v97-rose:#b76e79;
 --v97-rose-dark:#945b66;
 --v97-line:#e5d9d2;
 --v97-soft:#faf7f3;
}

/* ==========================================================
   ORÇAMENTO — TELA CLEAN / SEM FUNDO CREME
   Não altera as regras @media print já existentes.
   ========================================================== */
@media screen{
  #aba-orcamento,
  #aba-orcamentos{
    background:transparent!important;
  }

  #proposta-impressao{
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    border:0!important;
    border-radius:0!important;
    padding-top:0!important;
  }

  #proposta-impressao .prop-header{
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid rgba(183,110,121,.55)!important;
    padding:10px 0 16px!important;
    margin:0 0 28px!important;
  }

  #proposta-impressao .doc-brand-row{
    display:flex!important;
    justify-content:space-between!important;
    align-items:center!important;
    gap:18px!important;
  }

  #proposta-impressao .doc-brand-left{
    display:flex!important;
    align-items:center!important;
    gap:14px!important;
  }

  #proposta-impressao .img-logo{
    display:block!important;
    width:auto!important;
    height:70px!important;
    max-width:115px!important;
    object-fit:contain!important;
    margin:0!important;
  }

  #proposta-impressao .doc-brand-name{
    color:var(--v97-navy)!important;
    font-size:22px!important;
    font-weight:600!important;
  }

  #proposta-impressao .doc-brand-sub{
    color:#74777d!important;
    font-size:10.5px!important;
  }

  #proposta-impressao .prop-header h1{
    margin:26px auto 0!important;
    max-width:760px!important;
    color:var(--v97-navy)!important;
    font-size:17px!important;
    line-height:1.35!important;
    text-align:center!important;
  }

  #proposta-impressao .prop-section{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    padding:0!important;
    margin:0 0 28px!important;
  }

  #proposta-impressao .prop-section h3{
    background:transparent!important;
    color:var(--v97-rose-dark)!important;
    border:0!important;
    border-bottom:1px solid var(--v97-line)!important;
    padding:0 0 8px!important;
    margin-bottom:15px!important;
  }

  #proposta-impressao .row-linha{
    background:transparent!important;
  }

  #proposta-impressao .row-valor{
    background:transparent!important;
    border-bottom:1px dotted #cfc4be!important;
  }

  #proposta-impressao .box-pagamento{
    background:rgba(255,255,255,.55)!important;
    border:1px solid var(--v97-line)!important;
    border-left:2px solid var(--v97-rose)!important;
    box-shadow:none!important;
  }

  /* marca-d'água real da logo no corpo do orçamento */
  #proposta-impressao>.watermark{
    display:block!important;
    position:absolute!important;
    left:50%!important;
    top:48%!important;
    transform:translate(-50%,-50%)!important;
    width:46%!important;
    max-width:420px!important;
    height:auto!important;
    opacity:.055!important;
    pointer-events:none!important;
    z-index:0!important;
  }

  #proposta-impressao>*:not(.watermark){
    position:relative!important;
    z-index:2!important;
  }

  /* ==========================================================
     RECEITA — compacta, alinhada e sem blocos gigantes
     Relatório de impressão não é tocado.
     ========================================================== */
  #aba-financeiro .receita-resumo-grid{
    display:grid!important;
    grid-template-columns:minmax(220px,280px) minmax(220px,280px) auto!important;
    gap:14px!important;
    align-items:stretch!important;
    max-width:780px!important;
    margin:18px 0 18px!important;
  }

  #aba-financeiro .receita-kpi{
    min-height:94px!important;
    padding:16px 18px!important;
    margin:0!important;
    background:rgba(255,255,255,.58)!important;
    border:1px solid var(--v97-line)!important;
    border-top:2px solid #d7c1a4!important;
    border-radius:8px!important;
    box-shadow:none!important;
  }

  #aba-financeiro .receita-kpi .card-title{
    font-size:12.5px!important;
    color:var(--v97-rose-dark)!important;
    border:0!important;
    padding:0!important;
    margin:0 0 12px!important;
  }

  #aba-financeiro .receita-kpi .card-value{
    font-size:24px!important;
    margin:0!important;
  }

  #aba-financeiro .receita-avulsa-atalho{
    align-self:center!important;
    justify-self:start!important;
    min-width:0!important;
    width:auto!important;
    min-height:40px!important;
    padding:9px 13px!important;
    margin:0!important;
    background:transparent!important;
    border:1px solid #d8cbc4!important;
    border-radius:7px!important;
    box-shadow:none!important;
    color:var(--v97-navy)!important;
  }

  #aba-financeiro .receita-avulsa-atalho:hover{
    background:rgba(255,255,255,.7)!important;
    border-color:var(--v97-rose)!important;
  }

  #aba-financeiro .receita-avulsa-mais{
    color:var(--v97-rose)!important;
    font-size:16px!important;
  }

  #aba-financeiro .receita-avulsa-atalho strong{
    font-size:11.5px!important;
  }

  #aba-financeiro .receita-avulsa-atalho small{
    display:none!important;
  }

  #aba-financeiro .receita-avulsa-form{
    max-width:950px!important;
    margin:8px 0 22px!important;
    padding:18px 20px!important;
    background:rgba(255,255,255,.62)!important;
    border:1px solid var(--v97-line)!important;
    border-left:2px solid var(--v97-rose)!important;
    border-top:1px solid var(--v97-line)!important;
    border-radius:8px!important;
    box-shadow:none!important;
  }

  #aba-financeiro .receita-avulsa-form h3{
    color:var(--v97-navy)!important;
    font-size:14px!important;
    margin:0 0 14px!important;
  }
}

@media screen and (max-width:760px){
  #aba-financeiro .receita-resumo-grid{
    grid-template-columns:1fr 1fr!important;
    max-width:none!important;
  }
  #aba-financeiro .receita-avulsa-atalho{
    grid-column:1 / -1!important;
  }
  #proposta-impressao .doc-brand-row{
    align-items:flex-start!important;
  }
  #proposta-impressao .img-logo{
    height:55px!important;
  }
}

@media screen and (max-width:520px){
  #aba-financeiro .receita-resumo-grid{
    grid-template-columns:1fr!important;
  }
  #aba-financeiro .receita-avulsa-atalho{
    grid-column:auto!important;
  }
  #proposta-impressao .doc-brand-row{
    flex-direction:column!important;
  }
}


/* ===== estilo original 10 ===== */

@media screen {
  /* folha branca, sem creme dentro do documento */
  #proposta-impressao{
    max-width:850px!important;
    margin:20px auto 50px!important;
    padding:34px 42px 48px!important;
    box-sizing:border-box!important;
    background:#fff!important;
    background-image:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:0 3px 14px rgba(0,0,0,.05)!important;
    overflow:hidden!important;
    font-family:'Segoe UI',Arial,sans-serif!important;
    color:#252525!important;
  }

  /* marca d'água FP, grande e muito suave como no PDF */
  #proposta-impressao > .watermark{
    display:block!important;
    position:absolute!important;
    left:50%!important;
    top:51%!important;
    transform:translate(-50%,-50%)!important;
    width:61%!important;
    max-width:520px!important;
    height:auto!important;
    opacity:.055!important;
    z-index:0!important;
    pointer-events:none!important;
  }
  #proposta-impressao > *:not(.watermark){position:relative!important;z-index:2!important;}

  /* cabeçalho igual ao PDF: LOGO CENTRAL, título, data e linha */
  #proposta-impressao .prop-header{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    text-align:center!important;
    padding:0 0 12px!important;
    margin:0 0 26px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:2px solid #26374d!important;
  }
  #proposta-impressao .doc-brand-row{
    display:contents!important;
  }
  #proposta-impressao .doc-brand-left{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:0!important;
    width:100%!important;
  }
  #proposta-impressao .img-logo{
    display:block!important;
    order:1!important;
    width:76px!important;
    height:76px!important;
    max-width:76px!important;
    object-fit:contain!important;
    margin:0 auto 14px!important;
  }
  /* no PDF de referência não há nome/subtítulo ao lado da logo */
  #proposta-impressao .doc-brand-copy{
    display:none!important;
  }
  #proposta-impressao .prop-header h1{
    order:2!important;
    max-width:690px!important;
    margin:0 auto 10px!important;
    padding:0!important;
    color:#26374d!important;
    font-family:Georgia,'Times New Roman',serif!important;
    font-size:20px!important;
    line-height:1.35!important;
    font-weight:700!important;
    text-align:center!important;
  }
  #proposta-impressao #prop-data-header{
    order:3!important;
    align-self:flex-end!important;
    margin:0 0 0 auto!important;
    color:#777!important;
    font-size:11px!important;
    font-style:italic!important;
    text-align:right!important;
  }

  /* seções como no PDF */
  #proposta-impressao .prop-section{
    padding:0!important;
    margin:0 0 25px!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  #proposta-impressao .prop-section h3{
    margin:0 0 14px!important;
    padding:0 0 7px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #d8d1cc!important;
    color:#26374d!important;
    font-family:Georgia,'Times New Roman',serif!important;
    font-size:16px!important;
    font-weight:700!important;
  }
  #proposta-impressao .row-linha{
    display:flex!important;
    align-items:flex-start!important;
    gap:10px!important;
    margin:0 0 7px!important;
    background:transparent!important;
    font-size:11.5px!important;
    line-height:1.35!important;
  }
  #proposta-impressao .row-label{
    flex:0 0 150px!important;
    width:150px!important;
    color:#222!important;
    font-weight:700!important;
  }
  #proposta-impressao .row-valor{
    flex:1!important;
    min-height:17px!important;
    padding:0 0 3px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px dotted #c9c2bd!important;
    color:#333!important;
  }
  #proposta-impressao p,
  #proposta-impressao li{
    font-size:11.5px!important;
    line-height:1.55!important;
    color:#333!important;
  }
  #proposta-impressao .verbas-limpas{
    margin:8px 0 15px 20px!important;
  }
  #proposta-impressao .box-pagamento{
    margin-top:8px!important;
    padding:14px 16px!important;
    background:rgba(255,255,255,.78)!important;
    border:1px solid #ddd4ce!important;
    border-radius:3px!important;
    box-shadow:none!important;
  }
  #proposta-impressao .prop-termos p{margin:0 0 9px!important;}
  #proposta-impressao .prop-termos ul{line-height:1.5!important;}

  #proposta-impressao .prop-assinaturas{
    margin-top:34px!important;
  }
  #proposta-impressao .ass-flavia,
  #proposta-impressao .assinatura-flavia{
    color:#b76e79!important;
  }
  #proposta-impressao .assinatura-linha{
    border-color:#26374d!important;
  }
}

/* celular: preserva a estética, só reduz a folha */
@media screen and (max-width:760px){
  #proposta-impressao{
    margin:10px 0 30px!important;
    padding:24px 18px 36px!important;
    width:100%!important;
  }
  #proposta-impressao .prop-header h1{font-size:16px!important;}
  #proposta-impressao .img-logo{width:62px!important;height:62px!important;}
  #proposta-impressao .row-label{flex-basis:125px!important;width:125px!important;}
}


/* ===== estilo original 11 ===== */

:root{
 --v99-navy:#142b49;
 --v99-rose:#b96f7a;
 --v99-rose-soft:#e9c9ca;
 --v99-line:#ecd8d3;
 --v99-text:#17263c;
 --v99-muted:#667085;
 --v99-white:#fff;
}

@media screen{
  /* ======================================================
     RECEITAS — exatamente a estrutura visual aprovada
     ====================================================== */
  #aba-financeiro .receita-resumo-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:26px!important;
    width:100%!important;
    max-width:none!important;
    margin:28px 0 28px!important;
    align-items:stretch!important;
  }

  #aba-financeiro .receita-kpi,
  #aba-financeiro .receita-avulsa-atalho{
    min-height:190px!important;
    height:190px!important;
    box-sizing:border-box!important;
    padding:30px 32px!important;
    background:#fff!important;
    border:1px solid var(--v99-line)!important;
    border-radius:9px!important;
    box-shadow:0 5px 16px rgba(20,43,73,.07)!important;
  }

  #aba-financeiro .receita-kpi{
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
  }

  #aba-financeiro .receita-kpi .card-title{
    margin:0!important;
    padding:0 0 16px!important;
    border:0!important;
    border-bottom:1px solid var(--v99-rose-soft)!important;
    color:var(--v99-rose)!important;
    font-size:17px!important;
    font-weight:700!important;
    text-transform:uppercase!important;
  }

  #aba-financeiro .receita-kpi .card-value{
    margin:34px 0 0!important;
    color:var(--v99-navy)!important;
    font-size:30px!important;
    line-height:1!important;
    font-weight:700!important;
  }

  #aba-financeiro .receita-kpi:first-child .card-value{
    color:var(--v99-rose)!important;
  }

  #aba-financeiro .receita-avulsa-atalho{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:0!important;
    cursor:pointer!important;
    color:var(--v99-text)!important;
  }

  #aba-financeiro .receita-avulsa-atalho strong{
    display:block!important;
    width:100%!important;
    padding:0 0 16px!important;
    border-bottom:1px solid var(--v99-rose-soft)!important;
    color:var(--v99-rose)!important;
    font-size:17px!important;
    font-weight:700!important;
    text-transform:uppercase!important;
    white-space:normal!important;
  }

  #aba-financeiro .receita-avulsa-mais{
    display:block!important;
    align-self:center!important;
    margin:24px 0 4px!important;
    color:var(--v99-rose)!important;
    font-size:34px!important;
    font-weight:300!important;
  }

  #aba-financeiro .receita-avulsa-atalho small{
    display:block!important;
    align-self:center!important;
    color:var(--v99-muted)!important;
    font-size:12px!important;
  }

  /* formulário só aparece ABAIXO quando a função existente o abre */
  #aba-financeiro .receita-avulsa-form{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    margin:0 0 30px!important;
    padding:26px 30px!important;
    background:#fff!important;
    border:1px solid var(--v99-line)!important;
    border-left:1px solid var(--v99-line)!important;
    border-radius:9px!important;
    box-shadow:0 4px 14px rgba(20,43,73,.05)!important;
  }

  #aba-financeiro .receita-avulsa-form h3{
    margin:0 0 24px!important;
    padding:0 0 13px!important;
    color:var(--v99-rose)!important;
    font-size:17px!important;
    border-bottom:1px solid var(--v99-rose-soft)!important;
  }

  #aba-financeiro .receita-avulsa-form .form-grid{
    display:grid!important;
    grid-template-columns:1.15fr 1.15fr 1.15fr 1fr 1fr auto!important;
    gap:18px!important;
    align-items:end!important;
  }

  #aba-financeiro .receita-avulsa-form input,
  #aba-financeiro .receita-avulsa-form select{
    background:#fff!important;
    border:1px solid #e4cbc3!important;
    border-radius:6px!important;
    min-height:44px!important;
  }

  #aba-financeiro .receita-avulsa-form button{
    min-width:145px!important;
    min-height:44px!important;
    background:var(--v99-navy)!important;
    color:#fff!important;
    border:0!important;
    border-radius:6px!important;
  }

  /* ======================================================
     ORÇAMENTO — mesma linguagem CLEAN do sistema aprovado.
     Sem bloco creme. Folha branca, logo e transparência.
     ====================================================== */
  #aba-orcamento,
  #aba-orcamentos{
    background:transparent!important;
  }

  #proposta-impressao{
    position:relative!important;
    width:100%!important;
    max-width:980px!important;
    margin:24px auto 50px!important;
    padding:40px 52px 52px!important;
    box-sizing:border-box!important;
    background:#fff!important;
    background-image:none!important;
    border:1px solid rgba(236,216,211,.75)!important;
    border-radius:9px!important;
    box-shadow:0 5px 18px rgba(20,43,73,.06)!important;
    overflow:hidden!important;
  }

  #proposta-impressao > .watermark{
    display:block!important;
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:56%!important;
    max-width:500px!important;
    height:auto!important;
    opacity:.05!important;
    z-index:0!important;
    pointer-events:none!important;
  }

  #proposta-impressao > *:not(.watermark){
    position:relative!important;
    z-index:2!important;
  }

  #proposta-impressao .prop-header{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    padding:0 0 20px!important;
    margin:0 0 30px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid var(--v99-rose)!important;
  }

  #proposta-impressao .doc-brand-row{
    display:contents!important;
  }

  #proposta-impressao .doc-brand-left{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    width:100%!important;
  }

  #proposta-impressao .img-logo{
    display:block!important;
    width:92px!important;
    height:92px!important;
    max-width:92px!important;
    object-fit:contain!important;
    margin:0 auto 16px!important;
  }

  #proposta-impressao .doc-brand-copy{
    display:none!important;
  }

  #proposta-impressao .prop-header h1{
    margin:0 auto 12px!important;
    max-width:760px!important;
    color:var(--v99-navy)!important;
    font-family:'Segoe UI',Arial,sans-serif!important;
    font-size:18px!important;
    line-height:1.4!important;
    font-weight:700!important;
    text-align:center!important;
  }

  #proposta-impressao #prop-data-header{
    align-self:flex-end!important;
    margin:0!important;
    color:var(--v99-muted)!important;
    font-size:11px!important;
    font-style:normal!important;
  }

  #proposta-impressao .prop-section{
    margin:0 0 28px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  #proposta-impressao .prop-section h3{
    margin:0 0 16px!important;
    padding:0 0 8px!important;
    background:transparent!important;
    color:var(--v99-rose)!important;
    border:0!important;
    border-bottom:1px solid var(--v99-rose-soft)!important;
    font-family:'Segoe UI',Arial,sans-serif!important;
    font-size:15px!important;
    font-weight:700!important;
  }

  #proposta-impressao .row-linha{
    margin:0 0 9px!important;
    background:transparent!important;
  }

  #proposta-impressao .row-valor{
    background:transparent!important;
    border-bottom:1px dotted #d7ccc7!important;
  }

  #proposta-impressao .box-pagamento{
    background:rgba(255,255,255,.78)!important;
    border:1px solid var(--v99-line)!important;
    border-left:2px solid var(--v99-rose)!important;
    border-radius:6px!important;
    box-shadow:none!important;
  }
}

@media screen and (max-width:950px){
  #aba-financeiro .receita-resumo-grid{
    gap:14px!important;
  }
  #aba-financeiro .receita-kpi,
  #aba-financeiro .receita-avulsa-atalho{
    padding:22px!important;
  }
  #aba-financeiro .receita-avulsa-form .form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media screen and (max-width:700px){
  #aba-financeiro .receita-resumo-grid{
    grid-template-columns:1fr!important;
  }
  #aba-financeiro .receita-kpi,
  #aba-financeiro .receita-avulsa-atalho{
    height:auto!important;
    min-height:150px!important;
  }
  #aba-financeiro .receita-avulsa-form .form-grid{
    grid-template-columns:1fr!important;
  }
  #proposta-impressao{
    margin:10px 0 30px!important;
    padding:28px 18px 38px!important;
  }
}


/* ===== estilo original 12 ===== */

@media screen {
  /* área externa neutra; o documento é a folha branca */
  #aba-orcamento, #aba-orcamentos {
    background:transparent!important;
  }

  #proposta-impressao{
    position:relative!important;
    width:min(100%, 900px)!important;
    max-width:900px!important;
    margin:24px auto 55px!important;
    padding:42px 54px 58px!important;
    box-sizing:border-box!important;
    background:#fff!important;
    background-image:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:0 2px 10px rgba(0,0,0,.035)!important;
    overflow:hidden!important;
    color:#202020!important;
    font-family:"Century Gothic","Aptos","Segoe UI",Arial,sans-serif!important;
  }

  /* FP grande e quase transparente, como nas páginas do PDF */
  #proposta-impressao>.watermark{
    display:block!important;
    position:absolute!important;
    left:50%!important;
    top:51%!important;
    transform:translate(-50%,-50%)!important;
    width:64%!important;
    max-width:560px!important;
    height:auto!important;
    opacity:.075!important;
    filter:none!important;
    z-index:0!important;
    pointer-events:none!important;
  }
  #proposta-impressao>*:not(.watermark){
    position:relative!important;
    z-index:2!important;
  }

  /* TOPO: símbolo FP centralizado, exatamente como a referência */
  #proposta-impressao .prop-header{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    width:100%!important;
    padding:0 0 12px!important;
    margin:0 0 27px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:2px solid #26364b!important;
    text-align:center!important;
  }
  #proposta-impressao .doc-brand-row{
    display:contents!important;
  }
  #proposta-impressao .doc-brand-left{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    width:100%!important;
  }
  #proposta-impressao .img-logo{
    display:block!important;
    width:78px!important;
    height:78px!important;
    max-width:78px!important;
    margin:0 auto 16px!important;
    object-fit:contain!important;
  }
  #proposta-impressao .doc-brand-copy{
    display:none!important;
  }
  #proposta-impressao .prop-header h1{
    order:2!important;
    max-width:730px!important;
    margin:0 auto 10px!important;
    padding:0!important;
    color:#172a43!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:22px!important;
    line-height:1.42!important;
    font-weight:700!important;
    letter-spacing:.1px!important;
    text-align:center!important;
  }
  #proposta-impressao #prop-data-header{
    order:3!important;
    align-self:center!important;
    margin:0 auto 0!important;
    color:#737373!important;
    font-size:12px!important;
    font-style:italic!important;
    text-align:center!important;
  }

  /* títulos de seção: serifado marinho + filete fino */
  #proposta-impressao .prop-section{
    margin:0 0 26px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  #proposta-impressao .prop-section h3{
    margin:0 0 16px!important;
    padding:0 0 7px!important;
    color:#172a43!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #d6d1cd!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:18px!important;
    line-height:1.25!important;
    font-weight:700!important;
  }

  /* dados da primeira seção como o PDF */
  #proposta-impressao .row-linha{
    display:flex!important;
    align-items:flex-start!important;
    gap:13px!important;
    margin:0 0 8px!important;
    padding:0!important;
    background:transparent!important;
    font-size:12px!important;
    line-height:1.35!important;
  }
  #proposta-impressao .row-label{
    flex:0 0 155px!important;
    width:155px!important;
    color:#171717!important;
    font-weight:700!important;
  }
  #proposta-impressao .row-valor{
    flex:1!important;
    min-height:17px!important;
    padding:0 0 3px!important;
    color:#242424!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px dotted #c8c2bd!important;
  }

  #proposta-impressao p,
  #proposta-impressao li{
    color:#303030!important;
    font-size:12px!important;
    line-height:1.55!important;
  }
  #proposta-impressao .verbas-limpas{
    margin:10px 0 17px 20px!important;
  }

  /* investimento / forma de pagamento como página 2 */
  #proposta-impressao .box-pagamento{
    margin:9px 0 13px!important;
    padding:16px 18px!important;
    background:rgba(255,255,255,.86)!important;
    border:1px solid #ddd4cf!important;
    border-radius:3px!important;
    box-shadow:none!important;
  }

  /* aceite/assinaturas */
  #proposta-impressao .prop-assinaturas{
    margin-top:36px!important;
  }
  #proposta-impressao .ass-flavia,
  #proposta-impressao .assinatura-flavia{
    color:#b76e79!important;
  }
  #proposta-impressao .assinatura-linha{
    border-color:#26364b!important;
  }
}

/* Mantém a mesma folha no celular, apenas adaptada à largura */
@media screen and (max-width:760px){
  #proposta-impressao{
    width:100%!important;
    margin:10px 0 35px!important;
    padding:28px 20px 42px!important;
  }
  #proposta-impressao .img-logo{
    width:65px!important;height:65px!important;max-width:65px!important;
  }
  #proposta-impressao .prop-header h1{
    font-size:18px!important;
  }
  #proposta-impressao .row-label{
    flex:0 0 125px!important;width:125px!important;
  }
}


/* ===== estilo original 13 ===== */

@media screen{
  #aba-financeiro .receita-resumo-grid{
    justify-content:center!important;
    align-items:stretch!important;
  }

  #aba-financeiro .receita-kpi,
  #aba-financeiro .receita-avulsa-atalho{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  #aba-financeiro .receita-kpi .card-title,
  #aba-financeiro .receita-avulsa-atalho strong{
    width:100%!important;
    text-align:center!important;
  }

  #aba-financeiro .receita-kpi .card-value{
    margin:30px auto 0!important;
    text-align:center!important;
  }

  #aba-financeiro .receita-avulsa-mais{
    align-self:center!important;
    margin:0 auto 12px!important;
    text-align:center!important;
  }

  #aba-financeiro .receita-avulsa-atalho small{
    align-self:center!important;
    width:100%!important;
    text-align:center!important;
  }
}


/* ===== estilo original 14 ===== */

@media print {
  @page{size:A4;margin:12mm 14mm 14mm 14mm;}

  body.print-proposta{
    margin:0!important;padding:0!important;background:#fff!important;
    -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;
  }

  body.print-proposta > *:not(.container):not(.content):not(.tab-content),
  body.print-proposta header,
  body.print-proposta nav,
  body.print-proposta .main-header,
  body.print-proposta .nav-tabs,
  body.print-proposta .tabs,
  body.print-proposta .topbar,
  body.print-proposta .sidebar,
  body.print-proposta .no-print{
    display:none!important;
  }

  body.print-proposta .container,
  body.print-proposta .content,
  body.print-proposta .tab-content{
    width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
    background:#fff!important;border:0!important;box-shadow:none!important;
  }

  body.print-proposta #proposta-impressao{
    display:block!important;
    position:relative!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    background-image:none!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    color:#111!important;
    font-family:Arial,Helvetica,sans-serif!important;
    overflow:visible!important;
  }

  /* FP central ao fundo */
  body.print-proposta #proposta-impressao>.watermark{
    display:block!important;
    position:fixed!important;
    left:50%!important;top:49%!important;
    transform:translate(-50%,-50%)!important;
    width:49%!important;max-width:370px!important;height:auto!important;
    opacity:.07!important;
    z-index:0!important;pointer-events:none!important;
  }
  body.print-proposta #proposta-impressao>*:not(.watermark){
    position:relative!important;z-index:2!important;
  }

  /* CABEÇALHO exatamente na linguagem da imagem enviada */
  body.print-proposta #proposta-impressao .prop-header{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    text-align:center!important;
    margin:0 0 12px!important;
    padding:0 0 7px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:2px solid #17304f!important;
  }
  body.print-proposta #proposta-impressao .doc-brand-row{display:contents!important;}
  body.print-proposta #proposta-impressao .doc-brand-left{
    display:flex!important;flex-direction:column!important;align-items:center!important;width:100%!important;
  }
  body.print-proposta #proposta-impressao .doc-brand-copy{display:none!important;}
  body.print-proposta #proposta-impressao .img-logo{
    display:block!important;
    width:45px!important;height:45px!important;max-width:45px!important;
    object-fit:contain!important;
    margin:0 auto 7px!important;
  }
  body.print-proposta #proposta-impressao .prop-header h1{
    margin:0 auto 3px!important;padding:0!important;
    max-width:650px!important;
    color:#102742!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:13.5pt!important;
    line-height:1.28!important;
    font-weight:700!important;
    text-align:center!important;
  }
  body.print-proposta #proposta-impressao #prop-data-header{
    align-self:center!important;
    margin:0!important;
    color:#4f5c69!important;
    font-size:7.5pt!important;
    font-style:italic!important;
    text-align:center!important;
  }

  /* SEÇÕES */
  body.print-proposta #proposta-impressao .prop-section{
    margin:0 0 10px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;box-shadow:none!important;
    break-inside:auto!important;
  }
  body.print-proposta #proposta-impressao .prop-section h3{
    margin:0 0 7px!important;
    padding:0 0 3px!important;
    background:transparent!important;
    color:#102742!important;
    border:0!important;
    border-bottom:1px solid #c9aa96!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:9.5pt!important;
    line-height:1.2!important;
    font-weight:700!important;
  }

  /* DADOS — compacto, como a captura */
  body.print-proposta #proposta-impressao .row-linha{
    display:flex!important;
    align-items:flex-start!important;
    gap:7px!important;
    margin:0 0 3px!important;
    padding:0!important;
    background:transparent!important;
    font-size:7.7pt!important;
    line-height:1.2!important;
    break-inside:avoid!important;
  }
  body.print-proposta #proposta-impressao .row-label{
    flex:0 0 112px!important;
    width:112px!important;
    color:#111!important;
    font-weight:700!important;
  }
  body.print-proposta #proposta-impressao .row-valor{
    flex:1!important;
    min-height:12px!important;
    padding:0 0 2px!important;
    color:#111!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #cdb4a5!important;
  }

  body.print-proposta #proposta-impressao p,
  body.print-proposta #proposta-impressao li{
    margin-top:0!important;
    margin-bottom:5px!important;
    color:#111!important;
    font-size:7.8pt!important;
    line-height:1.34!important;
  }
  body.print-proposta #proposta-impressao ul{
    margin-top:4px!important;margin-bottom:7px!important;
  }
  body.print-proposta #proposta-impressao .verbas-limpas{
    margin:4px 0 7px 18px!important;
  }

  body.print-proposta #proposta-impressao .box-pagamento{
    padding:7px 9px!important;
    margin:5px 0 7px!important;
    background:rgba(255,255,255,.82)!important;
    border:1px solid #d7c2b6!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  body.print-proposta #proposta-impressao .prop-assinaturas{
    margin-top:18px!important;
    break-inside:avoid!important;
  }
  body.print-proposta #proposta-impressao .ass-flavia,
  body.print-proposta #proposta-impressao .assinatura-flavia{
    color:#b76e79!important;
  }
  body.print-proposta #proposta-impressao .assinatura-linha{
    border-color:#b76e79!important;
  }

  /* rodapé visual do modelo */
  body.print-proposta #proposta-impressao::after{
    content:"Porque cálculo é número, mas também é decisão!"!important;
    display:block!important;
    margin-top:14px!important;
    padding-top:6px!important;
    border-top:1px solid #c9aa96!important;
    color:#9a606a!important;
    font:italic 7.5pt Georgia,"Times New Roman",serif!important;
    text-align:center!important;
  }
}


/* ===== estilo original 15 ===== */

@media print {
  body.print-proposta .main-header,
  body.print-proposta .nav-tabs,
  body.print-proposta .header,
  body.print-proposta .no-print,
  body.print-proposta #area-formulario {
    display:none!important;
  }

  body.print-proposta .tab-content {
    display:none!important;
  }

  body.print-proposta #aba-orcamento {
    display:block!important;
    margin:0!important;
    padding:0!important;
    width:100%!important;
    max-width:none!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
  }

  body.print-proposta #proposta-impressao {
    display:block!important;
  }
}


/* ===== estilo original 16 ===== */

@media print {
  /* O bug do PDF branco era o contêiner principal sendo ocultado
     por uma regra genérica de impressão da versão anterior. */
  body.print-proposta > #sistema-principal {
    display:block!important;
    visibility:visible!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }

  body.print-proposta > #tela-login {
    display:none!important;
  }

  body.print-proposta #sistema-principal,
  body.print-proposta #aba-orcamento,
  body.print-proposta #proposta-impressao {
    visibility:visible!important;
  }

  body.print-proposta #aba-orcamento {
    display:block!important;
  }

  body.print-proposta #proposta-impressao {
    display:block!important;
  }
}


/* ===== estilo original 17 ===== */

@media print {
  body.print-proposta #proposta-impressao{
    position:relative!important;
  }

  body.print-proposta #proposta-impressao > .watermark{
    display:block!important;
    visibility:visible!important;
    position:fixed!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:50%!important;
    max-width:390px!important;
    height:auto!important;
    opacity:.065!important;
    object-fit:contain!important;
    z-index:0!important;
    pointer-events:none!important;
  }

  body.print-proposta #proposta-impressao > *:not(.watermark){
    position:relative!important;
    z-index:1!important;
  }
}


/* ===== estilo original 18 ===== */

@media print {
  @page { size:A4; margin:9mm 10mm 10mm; }

  body.print-relatorio{
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }

  body.print-relatorio > #tela-login,
  body.print-relatorio .main-header,
  body.print-relatorio .nav-tabs,
  body.print-relatorio .header,
  body.print-relatorio .no-print,
  body.print-relatorio #modoEdicaoRelatorio{
    display:none!important;
  }

  body.print-relatorio > #sistema-principal{
    display:block!important;
    visibility:visible!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }

  body.print-relatorio .tab-content{
    display:none!important;
  }

  body.print-relatorio #aba-relatorio{
    display:block!important;
    visibility:visible!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
  }

  body.print-relatorio #modoVisRelatorio{
    display:block!important;
    visibility:visible!important;
    margin:0!important;
    padding:0!important;
  }

  body.print-relatorio #modoVisRelatorio .folha-a4{
    display:block!important;
    visibility:visible!important;
    position:relative!important;
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
    overflow:visible!important;
    color:#111!important;
  }

  /* Logo superior e marca d'água permanecem */
  body.print-relatorio #modoVisRelatorio .folha-a4 > .watermark{
    display:block!important;
    visibility:visible!important;
    position:fixed!important;
    left:50%!important;
    top:51%!important;
    transform:translate(-50%,-50%)!important;
    width:48%!important;
    max-width:350px!important;
    height:auto!important;
    opacity:.055!important;
    z-index:0!important;
    pointer-events:none!important;
  }

  body.print-relatorio #modoVisRelatorio .folha-a4 > *:not(.watermark){
    position:relative!important;
    z-index:2!important;
  }

  body.print-relatorio .doc-header{
    margin:0 0 10px!important;
    padding:0 0 7px!important;
  }

  body.print-relatorio .doc-header .img-logo{
    height:52px!important;
    width:auto!important;
    margin:0 auto 5px!important;
  }

  body.print-relatorio .doc-header h2{
    font-size:15px!important;
    line-height:1.2!important;
    margin:0!important;
  }

  body.print-relatorio .doc-header p{
    font-size:8.5px!important;
    line-height:1.25!important;
    margin:3px 0 0!important;
  }

  body.print-relatorio .doc-section-title{
    margin-top:10px!important;
    padding:4px 5px!important;
    font-size:9px!important;
    line-height:1.2!important;
    page-break-after:avoid!important;
    break-after:avoid-page!important;
  }

  body.print-relatorio .doc-table{
    width:100%!important;
    margin:0 0 5px!important;
    font-size:8px!important;
    line-height:1.15!important;
    border-collapse:collapse!important;
  }

  body.print-relatorio .doc-table th,
  body.print-relatorio .doc-table td{
    padding:3px 4px!important;
    line-height:1.15!important;
  }

  body.print-relatorio .mapeamento-grid{
    gap:3px!important;
    margin:0!important;
  }

  body.print-relatorio .doc-item{
    min-height:0!important;
    padding:4px 5px!important;
    font-size:8px!important;
  }

  body.print-relatorio .doc-grid{
    gap:5px!important;
    margin-top:5px!important;
  }

  body.print-relatorio .doc-list-box{
    padding:5px!important;
    min-height:0!important;
    font-size:8px!important;
  }

  body.print-relatorio p{
    font-size:8px!important;
    line-height:1.25!important;
  }

  body.print-relatorio .folha-a4::after{
    margin-top:8px!important;
    padding-top:4px!important;
    font-size:7.5px!important;
  }

  body.print-relatorio table,
  body.print-relatorio .doc-item,
  body.print-relatorio .doc-list-box{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
}


/* ===== estilo original 19 ===== */

/* =========================================================
   PAGINAÇÃO PROFISSIONAL — TODOS OS DOCUMENTOS
   Evita títulos órfãos, assinaturas isoladas e quebras ruins.
   ========================================================= */
@media print {
  /* Texto longo pode fluir naturalmente entre páginas. */
  p, li, .texto-corrido, .row-valor, td {
    orphans: 3!important;
    widows: 3!important;
  }

  /* Títulos nunca ficam abandonados no rodapé. */
  .doc-section-title,
  .pdf-title,
  #proposta-impressao .prop-section h3 {
    break-after: avoid-page!important;
    page-break-after: avoid!important;
  }

  /* Pequenos blocos devem permanecer inteiros. */
  .doc-item,
  .doc-list-box,
  .box-pagamento,
  .assinatura-box {
    break-inside: avoid-page!important;
    page-break-inside: avoid!important;
  }

  /* A assinatura jamais deve ser cortada no meio e deve tentar
     permanecer junto do conteúdo imediatamente anterior. */
  .doc-assinatura,
  .prop-assinaturas {
    break-inside: avoid-page!important;
    page-break-inside: avoid!important;
    break-before: avoid-page!important;
    page-break-before: avoid!important;
  }

  /* PARECER: conclusão e assinatura funcionam como encerramento. */
  #out_impug_conclusao {
    break-after: avoid-page!important;
    page-break-after: avoid!important;
    orphans: 4!important;
    widows: 4!important;
  }

  /* ORÇAMENTO: evita separar os últimos termos da assinatura. */
  #proposta-impressao .prop-section:last-of-type {
    break-inside: auto!important;
  }
  #proposta-impressao .prop-section:last-of-type > *:last-child {
    break-after: avoid-page!important;
  }

  /* RECEITAS/HONORÁRIOS: cabeçalhos acompanham a primeira linha
     e cada registro curto não é cortado ao meio. */
  body.print-fin thead {
    display: table-header-group!important;
  }
  body.print-fin tr {
    break-inside: avoid-page!important;
    page-break-inside: avoid!important;
  }

  /* =========================================================
     RELATÓRIO PROCESSUAL — aparência baseada no relatório antigo
     enviado pela Flávia, mas com paginação corrigida.
     ========================================================= */
  body.print-relatorio #modoVisRelatorio .folha-a4 {
    font-family:"Century Gothic","GOTHIC","Arial",sans-serif!important;
    color:#202833!important;
  }

  body.print-relatorio .doc-header {
    border-bottom:2px solid #172a43!important;
    padding-bottom:9px!important;
    margin-bottom:12px!important;
    text-align:center!important;
  }

  body.print-relatorio .doc-header .img-logo {
    height:62px!important;
    width:auto!important;
    margin:0 auto 6px!important;
  }

  body.print-relatorio .doc-header h2 {
    font-family:Georgia,"Times New Roman",serif!important;
    color:#172a43!important;
    font-size:15pt!important;
    letter-spacing:.1px!important;
  }

  body.print-relatorio .doc-header p {
    font-size:8pt!important;
    color:#555!important;
  }

  body.print-relatorio .doc-section-title {
    color:#fff!important;
    background:#172a43!important;
    border-left:3px solid #b76e79!important;
    border-bottom:0!important;
    padding:5px 8px!important;
    margin:12px 0 7px!important;
    font-size:9pt!important;
    font-weight:700!important;
    text-transform:uppercase!important;
  }

  body.print-relatorio .doc-table {
    border-collapse:collapse!important;
    margin-bottom:7px!important;
  }

  body.print-relatorio .doc-table th,
  body.print-relatorio .doc-table td {
    border:1px solid #d7d9dc!important;
    padding:4px 6px!important;
    vertical-align:top!important;
    font-size:7.8pt!important;
  }

  body.print-relatorio .doc-table th {
    background:#f4f4f4!important;
    color:#333!important;
    font-weight:700!important;
  }

  body.print-relatorio .mapeamento-grid {
    grid-template-columns:repeat(3,1fr)!important;
    gap:6px!important;
  }

  body.print-relatorio .doc-item,
  body.print-relatorio .doc-list-box {
    border:1px solid #dedede!important;
    background:rgba(255,255,255,.88)!important;
    border-radius:0!important;
    padding:6px 8px!important;
  }

  /* Decisões são texto corrido e DEVEM poder atravessar páginas,
     como no relatório antigo. Não prender o bloco inteiro. */
  body.print-relatorio #outRelDecisoes,
  body.print-relatorio #outRelDecisoes > div {
    break-inside:auto!important;
    page-break-inside:auto!important;
  }

  body.print-relatorio #outRelDecisoes p {
    orphans:4!important;
    widows:4!important;
  }

  /* Marca d'água discreta em todas as páginas. */
  body.print-relatorio #modoVisRelatorio .folha-a4 > .watermark {
    position:fixed!important;
    left:50%!important;
    top:52%!important;
    width:55%!important;
    max-width:420px!important;
    opacity:.055!important;
  }

  /* O escopo e a assinatura formam o encerramento do relatório.
     Se não couberem com dignidade, os dois vão juntos para a página seguinte. */
  body.print-relatorio .doc-final-group-start {
    break-before:auto!important;
  }
  body.print-relatorio .doc-final-group-start + div {
    break-after:avoid-page!important;
    page-break-after:avoid!important;
  }
  body.print-relatorio .doc-final-group-start + div + .doc-assinatura {
    break-before:avoid-page!important;
    page-break-before:avoid!important;
    margin-top:22px!important;
    padding-top:0!important;
  }

  /* Assinatura mais compacta: nunca vira uma "página de assinatura". */
  body.print-relatorio .doc-assinatura,
  body.print-fin .doc-assinatura,
  body.print-proposta .doc-assinatura,
  body.print-proposta .prop-assinaturas,
  #impugnacao-pdf-box .doc-assinatura {
    min-height:0!important;
    margin-top:22px!important;
    margin-bottom:0!important;
    padding-top:0!important;
    padding-bottom:0!important;
  }

  body.print-relatorio .ass-flavia,
  #impugnacao-pdf-box .ass-flavia {
    color:#b76e79!important;
  }
}


/* ===== estilo original 20 ===== */

@media print {
  body.print-relatorio #modoVisRelatorio .folha-a4{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
    overflow:visible!important;
    font-family:"Century Gothic","GOTHIC","Arial",sans-serif!important;
    color:#202020!important;
  }

  /* SEM imagem/marca d'água no relatório */
  body.print-relatorio #modoVisRelatorio .watermark{
    display:none!important;
  }

  /* Cabeçalho clean, como orçamento/parecer */
  body.print-relatorio .doc-header{
    margin:0 0 18px!important;
    padding:0 0 10px!important;
    background:#fff!important;
    border:0!important;
    border-bottom:1.5px solid #172a43!important;
    text-align:center!important;
  }

  body.print-relatorio .doc-header .img-logo{
    display:none!important;
  }

  body.print-relatorio .doc-header h2{
    margin:0 auto 5px!important;
    padding:0!important;
    color:#172a43!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:16pt!important;
    line-height:1.25!important;
    font-weight:700!important;
    letter-spacing:.1px!important;
    text-align:center!important;
  }

  body.print-relatorio .doc-header p{
    margin:2px auto!important;
    padding:0!important;
    max-width:92%!important;
    color:#666!important;
    font-size:8.5pt!important;
    line-height:1.3!important;
    text-align:center!important;
  }

  /* Títulos simples: rose gold + filete fino. Nada de faixa azul. */
  body.print-relatorio .doc-section-title{
    margin:15px 0 8px!important;
    padding:0 0 5px!important;
    color:#a85f6b!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #dcc8c0!important;
    font-family:Georgia,"Times New Roman",serif!important;
    font-size:10pt!important;
    line-height:1.25!important;
    font-weight:700!important;
    text-transform:uppercase!important;
    box-shadow:none!important;
  }

  /* Tabelas sem "caixotão": linhas leves e fundo branco */
  body.print-relatorio .doc-table{
    width:100%!important;
    margin:0 0 9px!important;
    border-collapse:collapse!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
  }

  body.print-relatorio .doc-table th,
  body.print-relatorio .doc-table td{
    padding:5px 6px!important;
    background:#fff!important;
    border:0!important;
    border-bottom:1px solid #e5ddd8!important;
    color:#252525!important;
    font-size:8pt!important;
    line-height:1.25!important;
    vertical-align:top!important;
  }

  body.print-relatorio .doc-table th{
    color:#172a43!important;
    font-weight:700!important;
  }

  /* Documentos analisados: clean, sem caixas pesadas */
  body.print-relatorio .mapeamento-grid{
    grid-template-columns:repeat(3,1fr)!important;
    gap:0 14px!important;
    margin:0 0 7px!important;
  }

  body.print-relatorio .doc-item{
    min-height:0!important;
    margin:0!important;
    padding:5px 2px!important;
    background:#fff!important;
    border:0!important;
    border-bottom:1px solid #e5ddd8!important;
    border-radius:0!important;
    box-shadow:none!important;
    color:#252525!important;
    font-size:8pt!important;
  }

  body.print-relatorio .doc-grid{
    gap:8px!important;
    margin:0!important;
  }

  body.print-relatorio .doc-list-box{
    min-height:0!important;
    margin:0 0 7px!important;
    padding:6px 2px 7px!important;
    background:#fff!important;
    border:0!important;
    border-bottom:1px solid #e5ddd8!important;
    border-radius:0!important;
    box-shadow:none!important;
    color:#252525!important;
    font-size:8pt!important;
  }

  /* Decisões: texto corrido com filete discreto, sem barras laterais estranhas */
  body.print-relatorio #outRelDecisoes > div{
    margin:0 0 10px!important;
    padding:0 0 8px!important;
    background:#fff!important;
    border:0!important;
    border-bottom:1px solid #ece5e1!important;
    box-shadow:none!important;
  }

  body.print-relatorio #outRelDecisoes p,
  body.print-relatorio p{
    color:#292929!important;
    font-size:8.3pt!important;
    line-height:1.38!important;
  }

  /* Remove ornamentos pseudo-elementos que possam cair nas margens */
  body.print-relatorio #modoVisRelatorio .folha-a4::before,
  body.print-relatorio #modoVisRelatorio .folha-a4::after,
  body.print-relatorio .doc-section-title::before,
  body.print-relatorio .doc-section-title::after,
  body.print-relatorio .doc-list-box::before,
  body.print-relatorio .doc-list-box::after{
    content:none!important;
    display:none!important;
  }

  /* Assinatura limpa, rose gold, sem página isolada */
  body.print-relatorio .doc-assinatura{
    margin:24px auto 0!important;
    padding:0!important;
    width:58%!important;
    min-height:0!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
    text-align:center!important;
    break-inside:avoid-page!important;
    page-break-inside:avoid!important;
    break-before:avoid-page!important;
    page-break-before:avoid!important;
  }

  body.print-relatorio .doc-assinatura .ass-flavia{
    color:#b76e79!important;
  }

  /* Mantém a paginação inteligente da versão anterior */
  body.print-relatorio .doc-section-title{
    break-after:avoid-page!important;
    page-break-after:avoid!important;
  }

  body.print-relatorio #outRelDecisoes,
  body.print-relatorio #outRelDecisoes > div{
    break-inside:auto!important;
    page-break-inside:auto!important;
  }

  body.print-relatorio #outRelDecisoes p{
    orphans:4!important;
    widows:4!important;
  }

  body.print-relatorio .doc-assinatura{
    break-inside:avoid-page!important;
    page-break-inside:avoid!important;
  }
}


/* ===== estilo original 21 ===== */

body.print-relatorio #modoVisRelatorio .folha-a4::after{content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:#8f5660!important;border-top:1px solid #ded4ce!important;padding-top:8px!important;margin-top:24px!important;font-size:10px!important;}
body.print-relatorio #outRelDecisoes p{margin:0 0 9px!important;text-align:justify!important;line-height:1.55!important;white-space:normal!important;}


/* ===== estilo original 22 ===== */
@media print {
@page{size:A4;margin:14mm}body{font-family:Arial,sans-serif;color:#222;margin:0}h1{text-align:center;font-size:20px}.sub{text-align:center;color:#666;border-bottom:1px solid #ddd;padding-bottom:12px}.card{box-shadow:none!important;border:0!important}button{display:none!important}
}


/* ===== estilo original 23 ===== */

body.print-relatorio #modoVisRelatorio .folha-a4::after{content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:#8f5660!important;border-top:1px solid #ded4ce!important;padding-top:8px!important;margin-top:24px!important;font-size:10px!important;}
body.print-relatorio #outRelDecisoes p{margin:0 0 9px!important;text-align:justify!important;line-height:1.55!important;white-space:normal!important;}


/* ===== estilo original 24 ===== */
@media print {
@page{size:A4;margin:14mm}body{font-family:Arial;color:#222}.no-print{display:block}.card,.gf-panel,.gf-kpi,.gf-hero{box-shadow:none!important}
}


/* ===== estilo original 25 ===== */

body.print-relatorio #modoVisRelatorio .folha-a4::after{content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:#8f5660!important;border-top:1px solid #ded4ce!important;padding-top:8px!important;margin-top:24px!important;font-size:10px!important;}
body.print-relatorio #outRelDecisoes p{margin:0 0 9px!important;text-align:justify!important;line-height:1.55!important;white-space:normal!important;}


/* ===== estilo original 26 ===== */
@media print {
@page{size:A4;margin:14mm}body{font-family:Arial;color:#17243b}h1{text-align:center;font-size:20px}.periodo{text-align:center;color:#666;border-bottom:1px solid #c98b95;padding-bottom:12px;margin-bottom:18px}.card{box-shadow:none!important}button{display:none!important}
}


/* ===== estilo original 27 ===== */

body.print-relatorio #modoVisRelatorio .folha-a4::after{content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:#8f5660!important;border-top:1px solid #ded4ce!important;padding-top:8px!important;margin-top:24px!important;font-size:10px!important;}
body.print-relatorio #outRelDecisoes p{margin:0 0 9px!important;text-align:justify!important;line-height:1.55!important;white-space:normal!important;}


/* ===== estilo original 28 ===== */
@media print {

        @page { size: A4; margin: 18mm; }
        body { font-family: Arial, sans-serif; color: #111; line-height: 1.55; }
        img { max-width: 100%; height: auto; image-rendering: auto; -ms-interpolation-mode: bicubic; }
        .watermark { display: block !important; opacity: 0.12 !important; position: absolute !important; inset: 0 !important; text-align: center !important; }
        .watermark img { width: 220px !important; height: auto !important; }
        .no-print, .hide-print { display: none !important; }
        .doc-header, .prop-header, .impug-pdf-header { text-align: center; border-bottom: 2px solid #1f2f4a; padding-bottom: 10px; margin-bottom: 18px; }
        .doc-header h2, .prop-header h1, h1, h2, h3 { color: #1f2f4a; }
        table { border-collapse: collapse; width: 100%; }
        td, th { border: 1px solid #ddd; padding: 6px 8px; vertical-align: top; }
        .doc-section-title, .prop-section h3 { font-weight: bold; margin: 14px 0 8px; }
        .preview-print, .preview-esclarecimento, #impugnacao-pdf-box img { image-rendering: auto !important; object-fit: contain !important; }
      
/* V8.4 — relatório de cliente profissional */

.relatorio-cliente-print{display:none}
@media print{
  body.print-fin .relatorio-cliente-print{display:block!important;padding:0 0 18px!important;border-bottom:2px solid #1b2940;margin-bottom:18px}
  body.print-fin .relatorio-print-topo{display:flex;align-items:center;gap:14px;margin-bottom:16px}
  body.print-fin .relatorio-print-logo{width:58px;height:58px;object-fit:contain}
  body.print-fin .relatorio-print-topo h2{font-family:"Segoe UI",Arial,sans-serif!important;font-size:18px;letter-spacing:.8px;margin:0;color:#1b2940}
  body.print-fin .relatorio-print-sub{font:11px "Segoe UI",Arial,sans-serif;color:#8d6268;margin-top:3px}
  body.print-fin .relatorio-print-titulo{font:700 17px "Segoe UI",Arial,sans-serif;color:#1b2940;margin:8px 0 6px}
  body.print-fin .relatorio-print-cliente{font:700 13px "Segoe UI",Arial,sans-serif;color:#a86470;margin-bottom:3px}
  body.print-fin #print-fin-periodo{font:11px "Segoe UI",Arial,sans-serif;color:#666;margin:0}
  body.print-fin table{font-family:"Segoe UI",Arial,sans-serif!important;font-size:10px}
  body.print-fin th{background:#1b2940!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body.print-fin .card-value{color:#1b2940!important}
  body.print-fin::after{content:"Flávia Calculista • Porque cálculo é número, mas também é decisão!";display:block;margin-top:22px;padding-top:8px;border-top:1px solid #c9958f;font:10px "Segoe UI",Arial,sans-serif;color:#7d5358;text-align:center}
}


}


/* ===== estilo original 29 ===== */

/* Gestão Financeira V9.1 — composição mais leve */
#gestao-financeira-painel.gf-shell{margin:20px 0;background:transparent!important;border:0!important;box-shadow:none!important}
.gf-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;background:#fff;padding:24px 28px;border:1px solid #eadfd9;border-radius:16px;border-left:4px solid var(--rose-gold);box-shadow:0 8px 26px rgba(27,41,64,.045)}
.gf-eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--rose-gold-escuro);font-weight:700}.gf-hero h3{margin:5px 0 4px;font-size:24px}.gf-hero p{margin:0;color:#746a67;font-size:13px}.gf-hero-number{text-align:right;min-width:230px}.gf-hero-number span,.gf-kpi span,.gf-ticket span{display:block;font-size:11px;color:#756b68;margin-bottom:6px}.gf-hero-number strong{font-size:27px;color:#1b2940}
.gf-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}.gf-kpi{background:#fff;padding:17px 18px;border:1px solid #eadfd9;border-radius:13px}.gf-kpi strong{display:block;font-size:19px;color:#1b2940}.gf-kpi-accent{border-top:3px solid var(--rose-gold)}
.gf-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:14px}.gf-panel{background:#fff;border:1px solid #eadfd9;border-radius:14px;padding:20px}.gf-panel h4{margin:0 0 15px;color:#1b2940;font-size:15px;border-bottom:1px solid #f0e7e2;padding-bottom:10px}.gf-fields{display:grid;grid-template-columns:1fr;gap:4px}.gf-fields-2{grid-template-columns:1fr 1fr;gap:4px 12px}.gf-panel .input-group{margin-bottom:10px}.gf-panel input{background:#fff!important}.gf-ticket{margin-top:5px;padding:13px 15px;background:#fbf7f4;border-radius:10px;border-left:3px solid var(--rose-gold)}.gf-ticket strong{font-size:18px;color:#1b2940}.gf-ticket small{display:block;margin-top:3px;color:#857a76}.gf-note{font-size:11px;color:#817672;margin:12px 4px 0}
@media(max-width:900px){.gf-kpis{grid-template-columns:1fr 1fr}.gf-grid{grid-template-columns:1fr}.gf-hero{align-items:flex-start}.gf-hero-number{text-align:left}.gf-fields-2{grid-template-columns:1fr}}
/* Relatório de Honorários: Processo + saldo; cada trabalho mostra data e valor cobrado */
@media print{
 body.print-fin #aba-financeiro .table-container{border:0!important;margin-top:22px!important}
 body.print-fin #aba-financeiro .table-container>h3{background:transparent!important;color:var(--rose-gold-escuro)!important;border-bottom:1px solid var(--rose-gold-suave)!important;padding:10px 0!important;font-size:16px!important}
 body.print-fin #aba-financeiro table{width:100%!important;border-collapse:collapse!important}
 body.print-fin #aba-financeiro thead th{display:none!important}
 body.print-fin #aba-financeiro thead th:nth-child(1),body.print-fin #aba-financeiro thead th:nth-child(2),body.print-fin #aba-financeiro thead th:nth-child(4){display:table-cell!important;background:#fff!important;color:#1b2940!important;border-bottom:1px solid #d9b5b7!important;padding:8px 10px!important}
 body.print-fin #aba-financeiro thead th:nth-child(1){width:58%!important;text-align:left!important}body.print-fin #aba-financeiro thead th:nth-child(2){width:20%!important;text-align:center!important}body.print-fin #aba-financeiro thead th:nth-child(4){width:22%!important;text-align:center!important}
 body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td{display:none!important}
 body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(1),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(2),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(4){display:table-cell!important;background:transparent!important;padding:9px 10px!important;border-bottom:1px solid #eee3df!important}
 body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(2),body.print-fin #aba-financeiro tbody tr:not(.fin-processo-header) td:nth-child(4){text-align:center!important}
 body.print-fin #aba-financeiro .fin-processo-header td{display:table-cell!important;background:#fbf7f4!important;border-top:1.5px solid var(--rose-gold)!important;border-bottom:1px solid #ead7d2!important;padding:10px 12px!important}
 body.print-fin #aba-financeiro .fin-processo-header .fin-saldo-processo{color:var(--rose-gold-escuro)!important;white-space:nowrap!important}
 body.print-fin .relatorio-fin-watermark{opacity:.045!important}
}


/* ===== estilo original 30 ===== */

body.print-relatorio #modoVisRelatorio .folha-a4::after{content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:#8f5660!important;border-top:1px solid #ded4ce!important;padding-top:8px!important;margin-top:24px!important;font-size:10px!important;}
body.print-relatorio #outRelDecisoes p{margin:0 0 9px!important;text-align:justify!important;line-height:1.55!important;white-space:normal!important;}


/* V3: campos opcionais vazios nunca devem reaparecer por regras de impressão com !important */
body.print-proposta #proposta-impressao .ocultar-impressao{display:none!important;}
#caixa-sugestoes-municipio{z-index:9999!important;}

/* ===== V8.26 AUDITORIA VISUAL — PADRÃO DOCUMENTAL ÚNICO ===== */
.documento-padrao-flavia{position:relative;background:#fff;color:#222;font-family:var(--font-corpo);}
.documento-padrao-flavia>.doc-print-watermark{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:58%!important;max-width:480px!important;opacity:.05!important;z-index:0!important;pointer-events:none!important;}
.documento-padrao-flavia>.pdf-header,.documento-padrao-flavia>.pdf-body,.documento-padrao-flavia>p,.documento-padrao-flavia>div:not(.pdf-header){position:relative;z-index:2;}
.doc-header-padrao{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e5e7eb;padding-bottom:14px;margin-bottom:28px;}
.doc-logo-padrao{height:65px;width:auto;object-fit:contain;}
.doc-brand-name-padrao{font-family:var(--font-titulo);font-size:22px;color:var(--cor-principal-escura);display:block;}
.doc-brand-sub-padrao{font-size:11px;color:#777;display:block;margin-top:2px;}
.doc-local-padrao{text-align:right;font-size:13px;color:#555;}
.documento-padrao-flavia h2,.documento-padrao-flavia h3{color:var(--cor-principal-escura);}
.documento-padrao-flavia .pdf-body{line-height:1.65;text-align:justify;}
@media print{
 .documento-padrao-flavia{box-shadow:none!important;margin:0!important;max-width:none!important;width:100%!important;background:#fff!important;}
 .documento-padrao-flavia>.doc-print-watermark{display:block!important;position:fixed!important;opacity:.05!important;}
 .doc-header-padrao{break-inside:avoid;page-break-inside:avoid;}
}

/* ===== V8.27 FINAL — ACABAMENTO DOCUMENTAL E TELAS ===== */
@media print{
  .pdf-wrapper,.documento-padrao-flavia,#proposta-impressao,#pericia-juizo-proposta-pdf,#impugnacao-pdf-box,#pericia-pdf-box,#ar-impressao,#pd-impressao{
    border-left:0!important;border-right:0!important;box-shadow:none!important;
  }
  .pdf-wrapper:before,.pdf-wrapper:after,.documento-padrao-flavia:before,.documento-padrao-flavia:after,
  #impugnacao-pdf-box:before,#impugnacao-pdf-box:after{display:none!important;border:0!important;background:none!important;}
  .pdf-body h1,.pdf-body h2,.pdf-body h3,.pdf-body h4{break-after:avoid-page!important;page-break-after:avoid!important;}
  .pdf-body p,.bloco-pericia,.doc-bloco{orphans:3;widows:3;}
  .doc-assinatura{break-inside:avoid!important;page-break-inside:avoid!important;margin-top:34px!important;}
  .pdf-body h3 + p{break-before:avoid-page!important;}
}
#aba-despesas table{width:100%;table-layout:auto}
#aba-despesas td,#aba-despesas th{padding-left:8px!important;padding-right:8px!important}
#aba-despesas td:last-child{white-space:nowrap;min-width:220px}
#aba-despesas .btn-acao,#aba-despesas button{max-width:100%;box-sizing:border-box}
.arquivo-pericial-grid .coluna-db{min-width:0}

/* ===== V8.28 FINAL — IMPRESSÃO A4 E ACABAMENTO ===== */
.acoes-documentos-orcamento{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.acoes-documentos-orcamento .btn-pdf{font-size:13px;padding:10px 14px;min-width:0}
@page{size:A4 portrait;margin:14mm 15mm 15mm 15mm}
@media print{
 html,body{width:210mm!important;min-width:0!important;margin:0!important;padding:0!important;background:#fff!important}
 body *{box-sizing:border-box}
 .pdf-wrapper,.documento-padrao-flavia,#modoVisRelatorio,#proposta-impressao,#pericia-juizo-proposta-pdf,
 #impugnacao-pdf-box,#pericia-pdf-box,#ar-impressao,#pd-impressao{
   width:180mm!important;max-width:180mm!important;min-width:0!important;
   margin:0 auto!important;padding:0!important;transform:none!important;zoom:1!important;
   border:0!important;border-left:0!important;border-right:0!important;box-shadow:none!important;
   overflow:visible!important;background:#fff!important;
 }
 .pdf-wrapper:before,.pdf-wrapper:after,.documento-padrao-flavia:before,.documento-padrao-flavia:after,
 #modoVisRelatorio:before,#modoVisRelatorio:after,#impugnacao-pdf-box:before,#impugnacao-pdf-box:after,
 #pericia-pdf-box:before,#pericia-pdf-box:after,#ar-impressao:before,#ar-impressao:after{
   content:none!important;display:none!important;border:0!important;background:none!important;
 }
 .pdf-body{width:100%!important;max-width:none!important;font-size:10.5pt!important;line-height:1.5!important;
   text-align:justify!important;overflow:visible!important}
 .pdf-body p,.pdf-body li,.bloco-pericia p,.documento-padrao-flavia p{
   text-align:justify!important;line-height:1.5!important;orphans:3!important;widows:3!important;
 }
 .pdf-body p{margin:0 0 10pt 0!important}
 .pdf-body h1,.pdf-body h2,.pdf-body h3,.pdf-body h4{
   break-after:avoid-page!important;page-break-after:avoid!important;
 }
 .doc-assinatura,.assinatura-pericia,.assinatura-pdf{
   break-inside:avoid!important;page-break-inside:avoid!important;margin-top:24pt!important;
 }
 .bloco-pericia,.doc-bloco{break-inside:auto!important;page-break-inside:auto!important}
 .bloco-pericia:empty,.doc-bloco:empty{display:none!important}
 .encerramento-pericia{break-inside:avoid!important;page-break-inside:avoid!important}
 .doc-print-watermark{position:fixed!important;left:50%!important;top:50%!important;
   transform:translate(-50%,-50%)!important;max-width:115mm!important;opacity:.045!important}
}
#pericia-pdf-box .pdf-body,#ar-impressao .pdf-body,#impugnacao-pdf-box .pdf-body{text-align:justify}
#pericia-pdf-box .pdf-body p,#ar-impressao .pdf-body p,#impugnacao-pdf-box .pdf-body p{
 text-align:justify;line-height:1.5;margin-bottom:12px
}

/* ===== V8.29 — PADRÃO ÚNICO: PAPEL BRANCO, SEM FAIXAS ===== */
.titulo-documento-unico{text-align:center;margin:0 0 24px}.titulo-documento-unico h2{margin:0 0 6px;color:#13233b}.titulo-documento-unico p{text-align:center!important;margin:0;color:#555}
@media print{
 @page{size:A4 portrait;margin:13mm 15mm 14mm}
 html,body{background:#fff!important}
 #modoVisRelatorio .folha-a4,#proposta-impressao,#pericia-juizo-proposta-pdf,#impugnacao-pdf-box,#pericia-pdf-box,#ar-impressao,
 .pdf-wrapper,.documento-padrao-flavia,.folha-a4{
  background:#fff!important;background-image:none!important;border:0!important;border-left:0!important;border-right:0!important;outline:0!important;box-shadow:none!important
 }
 #modoVisRelatorio .folha-a4:before,#proposta-impressao:before,#pericia-juizo-proposta-pdf:before,#impugnacao-pdf-box:before,#pericia-pdf-box:before,#ar-impressao:before{
  content:none!important;display:none!important;background:none!important;border:0!important
 }
 .doc-header-padrao,.cabecalho-documento-unico,.pdf-header{background:#fff!important;border:0!important;border-bottom:1px solid #b76e79!important;padding:0 0 10px!important;margin:0 0 20px!important}
 .doc-logo-padrao,.pdf-header img{height:52px!important;width:auto!important}.doc-brand-name-padrao{font-size:17px!important;color:#13233b!important}.doc-brand-sub-padrao{font-size:8px!important}.doc-local-padrao{font-size:9px!important}
 .watermark,.doc-print-watermark{display:block!important;position:fixed!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:105mm!important;max-width:105mm!important;opacity:.035!important;border:0!important;box-shadow:none!important}
 .pdf-body p,.documento-padrao-flavia p,#modoVisRelatorio p,#impugnacao-pdf-box p,#ar-impressao p{text-align:justify!important;line-height:1.5!important;orphans:3!important;widows:3!important}
 .doc-assinatura,.assinatura-pdf,.assinatura-pericia{break-inside:avoid-page!important;page-break-inside:avoid!important;background:#fff!important}
 body.print-relatorio #modoVisRelatorio .folha-a4::after,body.print-proposta #proposta-impressao::after,body.print-impug #impugnacao-pdf-box::after,body.print-pericia #pericia-pdf-box::after,body.print-analise-recursal #ar-impressao::after,body.print-pericia-juizo-proposta #pericia-juizo-proposta-pdf::after{
  content:"Porque cálculo é número, mas também é decisão!"!important;display:block!important;text-align:center!important;color:#8f5660!important;border:0!important;border-top:1px solid #ead1d5!important;background:#fff!important;padding-top:7px!important;margin-top:22px!important;font-size:9px!important
 }
}

/* ===== V8.30 — CORREÇÃO CIRÚRGICA DA IMPRESSÃO ===== */
@media print{
  /* O creme vinha do contêiner da aba, não do documento. Na impressão, todos os ancestrais são brancos. */
  #sistema-principal,.container,.tab-content,.content-wrapper,.main-content,
  #aba-relatorio,#aba-orcamento,#aba-impugnacao,#aba-pericia,#aba-analise-recursal{
    background:#fff!important;background-image:none!important;
    border:0!important;box-shadow:none!important;
  }

  /* Sem moldura/faixa lateral em NENHUM documento técnico. */
  #modoVisRelatorio,#modoVisRelatorio .folha-a4,
  #proposta-impressao,#pericia-juizo-proposta-pdf,
  #impugnacao-pdf-box,#pericia-pdf-box,#ar-impressao{
    background:#fff!important;background-image:none!important;
    border-left:0!important;border-right:0!important;
    box-shadow:none!important;outline:0!important;
  }

  /* Isolamento real: só a aba/documento escolhido participa da impressão. */
  body.print-pericia .tab-content{display:none!important}
  body.print-pericia #aba-pericia{display:block!important;padding:0!important}
  body.print-pericia #aba-pericia>*:not(#pericia-pdf-box){display:none!important}
  body.print-pericia #pericia-pdf-box{display:block!important}

  body.print-analise-recursal .tab-content{display:none!important}
  body.print-analise-recursal #aba-analise-recursal{display:block!important;padding:0!important}
  body.print-analise-recursal #aba-analise-recursal>*:not(#ar-impressao){display:none!important}
  body.print-analise-recursal #ar-impressao{display:block!important}

  body.print-impug .tab-content{display:none!important}
  body.print-impug #aba-impugnacao{display:block!important;padding:0!important}
  body.print-impug #aba-impugnacao>*:not(#impugnacao-pdf-box){display:none!important}
  body.print-impug #impugnacao-pdf-box{display:block!important}

  body.print-pericia-juizo-proposta .tab-content{display:none!important}
  body.print-pericia-juizo-proposta #aba-orcamento{display:block!important;padding:0!important}
  body.print-pericia-juizo-proposta #aba-orcamento>*:not(#pericia-juizo-proposta-pdf){display:none!important}
  body.print-pericia-juizo-proposta #pericia-juizo-proposta-pdf{
    display:block!important;background:#fff!important;width:180mm!important;max-width:180mm!important;
    margin:0 auto!important;padding:0!important
  }
  body.print-pericia-juizo-proposta #proposta-impressao{display:none!important}

  body.print-proposta .tab-content{display:none!important}
  body.print-proposta #aba-orcamento{display:block!important;padding:0!important}
  body.print-proposta #aba-orcamento>*:not(#proposta-impressao){display:none!important}
  body.print-proposta #proposta-impressao{display:block!important;background:#fff!important}

  /* Marca d'água garantida também na Análise Recursal. */
  body.print-analise-recursal #ar-impressao{position:relative!important}
  body.print-analise-recursal #ar-impressao>.doc-print-watermark{
    display:block!important;visibility:visible!important;position:fixed!important;
    left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;
    width:105mm!important;max-width:105mm!important;height:auto!important;
    opacity:.045!important;z-index:0!important;pointer-events:none!important
  }
  body.print-analise-recursal #ar-impressao>.pdf-header,
  body.print-analise-recursal #ar-impressao>.pdf-body{
    position:relative!important;z-index:2!important;background:transparent!important
  }
}

/* V8.32 FINAL — Central do Processo */
.central-processo-v832{background:#fff;border:1px solid #eadfe2;border-radius:16px;padding:20px;margin:0 0 22px}
.central-processo-head h2{margin:0;color:#17344b}.central-processo-head p{margin:6px 0;color:#68727b;font-size:13px}
.central-processo-busca{display:flex;gap:10px;margin:16px 0}.central-processo-busca input{flex:1;padding:12px 14px;border:1px solid #d8dfe3;border-radius:10px}
.central-processo-busca button{padding:0 24px;border:0;border-radius:9px;font-weight:700;cursor:pointer}
.central-resultado{border:1px solid #e7e9eb;border-radius:10px;padding:12px;background:#fbfcfc;cursor:pointer;margin:8px 0}
.central-resultado:hover{border-color:#b76e79}.central-resultado strong{color:#17344b}.central-resultado small{display:block;color:#6f777d;margin-top:4px}
.central-resumo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:12px 0}
.central-resumo-card{background:#faf7f7;border:1px solid #eadfe2;border-radius:12px;padding:12px}.central-resumo-card b{display:block;color:#17344b;margin-bottom:4px}
.central-timeline{position:relative;margin:18px 0 0;padding-left:24px}.central-timeline:before{content:"";position:absolute;left:7px;top:4px;bottom:4px;width:2px;background:#ead1d5}
.central-evento{position:relative;margin:0 0 13px;background:#fff;border:1px solid #e5e8ea;border-radius:10px;padding:11px 12px}.central-evento:before{content:"";position:absolute;left:-22px;top:15px;width:10px;height:10px;border-radius:50%;background:#b76e79}
.central-evento .data{font-size:11px;color:#7b8388}.central-evento .tipo{font-weight:700;color:#17344b}.central-evento .detalhe{font-size:12px;color:#59636a;margin-top:3px}
.central-vazio{padding:14px;text-align:center;color:#777;background:#fafafa;border-radius:10px}
@media(max-width:700px){.central-processo-busca{flex-direction:column}.central-processo-busca button{min-height:42px}}


/* V9 LOCAL — Auditoria do Cálculo. Isolado; não altera telas existentes. */
.rcr-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:14px;align-items:center;margin:18px 0}
.rcr-step{background:#fff;border:1px solid var(--cor-borda,#e5e7eb);border-radius:12px;padding:16px;min-height:145px}
.rcr-step span{font-weight:800;color:var(--cor-principal-escura,#17344b)}
.rcr-step h3{margin:5px 0 8px}.rcr-step p{font-size:12px;line-height:1.55;color:#64748b;margin:0}.rcr-arrow{font-size:22px;font-weight:bold}
.rcr-audit-grid{align-items:start}.rcr-local-warning{background:#fff8e8;border:1px solid #efd99b;border-radius:8px;padding:10px;font-size:12px}
.rcr-card-title{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.rcr-card-title h3{margin:0}.rcr-card-title p{margin:4px 0 0;font-size:12px;color:#64748b}
.rcr-table-scroll{overflow:auto}.rcr-audit-table{width:100%;min-width:1000px;border-collapse:collapse;margin-top:14px}.rcr-audit-table th,.rcr-audit-table td{border-bottom:1px solid #e5e7eb;padding:8px;vertical-align:top;text-align:left}.rcr-audit-table input,.rcr-audit-table textarea,.rcr-audit-table select{width:100%;box-sizing:border-box;padding:8px;border:1px solid #cbd5e1;border-radius:6px}
.rcr-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}.rcr-summary-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:14px}.rcr-summary-card b{display:block;font-size:25px;margin-top:4px}.rcr-empty{grid-column:1/-1;color:#64748b;padding:12px}
.rcr-kb-list{margin-top:16px}.rcr-kb-item{border-top:1px solid #e5e7eb;padding:10px 0}.rcr-kb-item small{color:#64748b}
@media(max-width:800px){.rcr-flow{grid-template-columns:1fr}.rcr-arrow{display:none}.rcr-summary{grid-template-columns:1fr 1fr}}
.aud-process-results{max-height:280px;overflow:auto;border:1px solid #e5e7eb;border-radius:8px;margin-top:8px}.aud-process-option{display:block;width:100%;text-align:left;padding:10px 12px;border:0;border-bottom:1px solid #eef2f7;background:#fff;cursor:pointer;font-size:12px}.aud-process-option:hover{background:#f8fafc}.aud-selected-process,.aud-source-auto{margin-top:10px;padding:12px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0}.aud-file-status{font-size:12px;line-height:1.6;margin:-2px 0 10px;color:#475569}.aud-pending{font-size:11px;color:#92400e;background:#fff7ed;padding:4px 6px;border-radius:5px}

/* ================================================================
   V9.5.2 — PADRÃO DOCUMENTAL FLÁVIA CALCULISTA
   Princípios: hierarquia, legibilidade, densidade controlada,
   destaque técnico sóbrio e unidade visual.
   Não altera conteúdo técnico nem identidade da marca.
   ================================================================ */
:root{
  --doc-font-body: "Segoe UI", Arial, sans-serif;
  --doc-font-title: "Segoe UI", Arial, sans-serif;
  --doc-ink:#202631;
  --doc-muted:#5f6670;
  --doc-navy:#1b2940;
  --doc-rose:#a96570;
  --doc-rose-soft:#d9b8bd;
  --doc-line:#e8e1de;
  --doc-paper:#ffffff;
  --doc-size:12.6px;
  --doc-leading:1.62;
}

/* Família documental: aplica o mesmo ritmo ao Relatório, Parecer,
   Análise Recursal, documentos periciais e propostas impressas. */
#proposta-impressao,
#modoVisRelatorio .folha-a4,
#impugnacao-pdf-box,
#ar-impressao,
#pd-impressao,
#pericia-pdf-box,
#pericia-juizo-proposta-pdf,
.doc-pericial-preview,
#esclarecimento-pdf-box,
.documento-padrao-flavia{
  font-family:var(--doc-font-body)!important;
  font-size:var(--doc-size)!important;
  line-height:var(--doc-leading)!important;
  color:var(--doc-ink)!important;
  background:var(--doc-paper)!important;
  text-rendering:optimizeLegibility;
  font-kerning:normal;
  hyphens:none;
}

/* Parágrafo jurídico/técnico: menos “paredão”, mais leitura. */
#proposta-impressao p,
#modoVisRelatorio .folha-a4 p,
#impugnacao-pdf-box p,
#ar-impressao p,
#pd-impressao p,
#pericia-pdf-box p,
#pericia-juizo-proposta-pdf p,
.doc-pericial-preview p,
#esclarecimento-pdf-box p,
.texto-corrido,.impug-pdf-texto{
  margin:0 0 .78em!important;
  line-height:var(--doc-leading)!important;
  text-align:justify!important;
  text-indent:0!important;
  orphans:3;
  widows:3;
}

/* Títulos: hierarquia visual sem “gritar”. */
#proposta-impressao h1,#proposta-impressao h2,
#modoVisRelatorio .folha-a4 h1,#modoVisRelatorio .folha-a4 h2,
#impugnacao-pdf-box h1,#impugnacao-pdf-box h2,
#ar-impressao h1,#ar-impressao h2,
#pd-impressao h1,#pd-impressao h2,
#pericia-pdf-box h1,#pericia-pdf-box h2,
#pericia-juizo-proposta-pdf h1,#pericia-juizo-proposta-pdf h2,
.doc-pericial-preview h1,.doc-pericial-preview h2,
#esclarecimento-pdf-box h1,#esclarecimento-pdf-box h2{
  font-family:var(--doc-font-title)!important;
  color:var(--doc-navy)!important;
  font-weight:700!important;
  letter-spacing:.025em!important;
  line-height:1.25!important;
  page-break-after:avoid!important;
  break-after:avoid-page!important;
}

.doc-section-title,.pdf-title,.impug-pdf-titulo,
.doc-pericial-section h5,
#ar-impressao-corpo h3,#ar-impressao-corpo h4,
#pd-print-corpo h3,#pd-print-corpo h4,
#out-pericia-corpo h3,#out-pericia-corpo h4{
  font-family:var(--doc-font-title)!important;
  color:var(--doc-navy)!important;
  background:transparent!important;
  font-weight:700!important;
  text-transform:none!important;
  letter-spacing:.018em!important;
  line-height:1.32!important;
  border:0!important;
  border-left:3px solid var(--doc-rose)!important;
  border-bottom:1px solid var(--doc-line)!important;
  padding:5px 0 5px 10px!important;
  margin:20px 0 10px!important;
  page-break-after:avoid!important;
  break-after:avoid-page!important;
}

/* Subtítulos e rótulos técnicos. */
#proposta-impressao h3,#proposta-impressao h4,
#modoVisRelatorio .folha-a4 h3,#modoVisRelatorio .folha-a4 h4,
#impugnacao-pdf-box h3,#impugnacao-pdf-box h4,
.doc-pericial-preview h3,.doc-pericial-preview h4,
#esclarecimento-pdf-box h3,#esclarecimento-pdf-box h4{
  color:var(--doc-navy)!important;
  font-weight:650!important;
  line-height:1.35!important;
  margin:16px 0 7px!important;
  page-break-after:avoid!important;
  break-after:avoid-page!important;
}

/* Destaques: números e conclusões ganham peso, não caixas pesadas. */
.documento-padrao-flavia strong,
#impugnacao-pdf-box strong,
#modoVisRelatorio .folha-a4 strong,
.doc-pericial-preview strong{
  color:var(--doc-navy);
  font-weight:700;
}

/* Tabelas: cabeçalho branco + filete institucional. */
#proposta-impressao table,
#modoVisRelatorio .folha-a4 table,
#impugnacao-pdf-box table,
#ar-impressao table,#pd-impressao table,
#pericia-pdf-box table,
.doc-pericial-preview table,
#esclarecimento-pdf-box table{
  width:100%!important;
  border-collapse:collapse!important;
  margin:10px 0 16px!important;
  font-size:11.6px!important;
  line-height:1.42!important;
}
#proposta-impressao th,
#modoVisRelatorio .folha-a4 th,
#impugnacao-pdf-box th,
#ar-impressao th,#pd-impressao th,
#pericia-pdf-box th,
.doc-pericial-preview th,
#esclarecimento-pdf-box th{
  background:#fff!important;
  color:var(--doc-navy)!important;
  font-weight:700!important;
  border:0!important;
  border-bottom:1.5px solid var(--doc-rose-soft)!important;
  padding:7px 8px!important;
  vertical-align:top!important;
}
#proposta-impressao td,
#modoVisRelatorio .folha-a4 td,
#impugnacao-pdf-box td,
#ar-impressao td,#pd-impressao td,
#pericia-pdf-box td,
.doc-pericial-preview td,
#esclarecimento-pdf-box td{
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid var(--doc-line)!important;
  padding:7px 8px!important;
  vertical-align:top!important;
}

/* Laudo/manifestação: remove blocos creme/cinza na saída documental. */
.doc-pericial-preview .doc-pericial-section,
#esclarecimento-pdf-box .doc-pericial-section,
#pericia-pdf-box .doc-pericial-section{
  background:#fff!important;
  border:0!important;
  border-left:2px solid var(--doc-rose-soft)!important;
  border-radius:0!important;
  padding:5px 0 5px 12px!important;
  margin:0 0 14px!important;
}

/* Listas e citações: compactas e legíveis. */
.documento-padrao-flavia ul,.documento-padrao-flavia ol,
#impugnacao-pdf-box ul,#impugnacao-pdf-box ol,
.doc-pericial-preview ul,.doc-pericial-preview ol{
  margin:6px 0 12px 22px!important;
  padding:0!important;
}
.documento-padrao-flavia li,#impugnacao-pdf-box li,.doc-pericial-preview li{
  margin:0 0 5px!important;
  padding-left:2px!important;
}
.documento-padrao-flavia blockquote,#impugnacao-pdf-box blockquote,.doc-pericial-preview blockquote{
  margin:10px 0 14px!important;
  padding:8px 12px!important;
  border-left:3px solid var(--doc-rose-soft)!important;
  background:#fff!important;
  color:#39404a!important;
}

/* Assinatura nunca fica órfã. */
.doc-assinatura,.doc-pericial-assinatura,.assinatura-box{
  break-inside:avoid!important;
  page-break-inside:avoid!important;
  margin-top:30px!important;
}

/* Blocos técnicos não devem partir quando couberem na próxima página. */
.doc-table tr,.doc-pericial-tabela tr,
.impug-pdf-ponto,
.doc-pericial-ponto{
  break-inside:avoid;
  page-break-inside:avoid;
}

/* Impressão A4: branco absoluto, sem faixas laterais, ritmo editorial. */
@media print{
  @page{size:A4;margin:16mm 15mm 18mm!important;}
  html,body{background:#fff!important;}
  #proposta-impressao,#modoVisRelatorio .folha-a4,#impugnacao-pdf-box,
  #ar-impressao,#pd-impressao,#pericia-pdf-box,#pericia-juizo-proposta-pdf,
  .doc-pericial-preview,#esclarecimento-pdf-box,.documento-padrao-flavia{
    width:auto!important;max-width:none!important;
    margin:0!important;padding:0!important;
    background:#fff!important;background-image:none!important;
    box-shadow:none!important;border:0!important;border-radius:0!important;
  }
  .doc-pericial-preview .preview-body-doc{padding:0!important;box-shadow:none!important;border-radius:0!important;background:#fff!important;}
  .doc-pericial-preview .preview-body-doc::before{display:none!important;}
  .doc-section-title,.pdf-title,.impug-pdf-titulo,.doc-pericial-section h5{
    margin-top:16px!important;
  }
}

/* V9.5.7 — identificação documental visível */
#proposta-impressao .prop-header h1{font-size:18px!important;letter-spacing:.04em!important;margin-bottom:5px!important}
.doc-subtitulo-tipo{font-size:10.5px!important;text-align:center!important;color:#5f6670!important;margin:0 0 18px!important;text-transform:none!important}
.titulo-documento-unico .doc-numero-processo{font-size:10.5px!important;font-weight:600!important;color:#1a2a44!important;margin:2px 0 4px!important;text-align:center!important}

#build-version-badge{position:fixed;right:14px;bottom:12px;z-index:99999;font:600 10px/1.2 "Segoe UI",Arial,sans-serif;color:#1a2a44;background:rgba(255,255,255,.94);border:1px solid #d9b8bd;border-radius:10px;padding:4px 8px;box-shadow:0 1px 4px rgba(0,0,0,.08);pointer-events:none}
@media print{#build-version-badge{display:none!important}}

/* V122 — Parecer técnico com fluxo editorial contínuo.
   Mantém a tipografia institucional e evita tópicos isolados ou páginas vazias. */
@media print{
  #impugnacao-pdf-box,.documento-padrao-flavia,.civil-ai-document,
  #ar-impressao,#pd-impressao,#pericia-pdf-box,#esclarecimento-pdf-box{
    font-family:var(--doc-font-body)!important;
    font-size:11.4px!important;
    line-height:1.45!important;
  }
  #impugnacao-pdf-box .impug-pdf-ponto,
  #impugnacao-pdf-box .doc-section,
  .documento-padrao-flavia .doc-section,
  .civil-ai-document .doc-section,
  .doc-pericial-preview .doc-pericial-section{
    break-inside:auto!important;
    page-break-inside:auto!important;
    margin:0 0 10px!important;
    padding-top:0!important;
    padding-bottom:0!important;
  }
  #impugnacao-pdf-box p,.documento-padrao-flavia p,.civil-ai-document p,
  #ar-impressao p,#pd-impressao p,#pericia-pdf-box p,#esclarecimento-pdf-box p{
    margin:0 0 6px!important;
    line-height:1.45!important;
    orphans:3!important;
    widows:3!important;
  }
  #impugnacao-pdf-box h2,#impugnacao-pdf-box h3,#impugnacao-pdf-box h4,
  .documento-padrao-flavia h2,.documento-padrao-flavia h3,.documento-padrao-flavia h4,
  .civil-ai-document h2,.civil-ai-document h3,.civil-ai-document h4,
  .doc-section-title,.impug-pdf-titulo,.pdf-title{
    break-after:avoid-page!important;
    page-break-after:avoid!important;
    margin-top:12px!important;
    margin-bottom:6px!important;
  }
  #impugnacao-pdf-box h2 + *,#impugnacao-pdf-box h3 + *,#impugnacao-pdf-box h4 + *,
  .documento-padrao-flavia h2 + *,.documento-padrao-flavia h3 + *,.documento-padrao-flavia h4 + *,
  .doc-section-title + *,.impug-pdf-titulo + *{
    break-before:avoid-page!important;
    page-break-before:avoid!important;
  }
  #impugnacao-pdf-box ul,#impugnacao-pdf-box ol,
  .documento-padrao-flavia ul,.documento-padrao-flavia ol,
  .civil-ai-document ul,.civil-ai-document ol{margin:4px 0 8px 20px!important;}
  #impugnacao-pdf-box li,.documento-padrao-flavia li,.civil-ai-document li{margin-bottom:3px!important;}
  .doc-assinatura,.doc-pericial-assinatura,.assinatura-box{margin-top:16px!important;}
}
/* Modal compacto para tarefas manuais. */
#modal-tarefa-manual,#modal-orcamento-recusado,#modal-ajuste-demanda,#modal-concluir-ajuste{position:fixed!important;inset:0!important;z-index:9999!important;background:rgba(16,27,45,.48)!important;align-items:center!important;justify-content:center!important;padding:18px!important;box-sizing:border-box!important}
#modal-tarefa-manual .modal-content,#modal-orcamento-recusado .modal-content,#modal-ajuste-demanda .modal-content,#modal-concluir-ajuste .modal-content{width:min(680px,100%)!important;max-height:90vh!important;overflow:auto!important;background:var(--cor-branco)!important;border:1px solid var(--cor-borda)!important;border-radius:10px!important;padding:22px!important;box-shadow:0 18px 46px rgba(0,0,0,.28)!important}
#modal-ajuste-demanda[style*="display: none"],#modal-concluir-ajuste[style*="display: none"]{display:none!important}
#modal-tarefa-manual.is-open{display:flex!important}
.tarefa-manual{background:#c53030!important;color:#fff!important;border-radius:4px!important;padding:3px 5px!important}
.tarefa-manual::before{content:''!important;margin:0!important}

/* Hotfix produção v2 - 26/08/2026 */
#modal-followup-operacional,#modal-intencao-relatorio{position:fixed!important;inset:0!important;z-index:10050!important;background:rgba(16,27,45,.55)!important;align-items:center!important;justify-content:center!important;padding:20px!important;box-sizing:border-box!important}
#modal-followup-operacional[style*="display: none"],#modal-intencao-relatorio[style*="display: none"],#modal-ajuste-demanda[style*="display: none"],#modal-concluir-ajuste[style*="display: none"]{display:none!important}
#modal-followup-operacional .modal-content,#modal-intencao-relatorio .modal-content{width:min(620px,96vw)!important;max-height:90vh!important;overflow:auto!important;background:#fff!important;border:1px solid #d8c6b5!important;border-radius:16px!important;box-shadow:0 22px 60px rgba(16,27,45,.28)!important;padding:24px!important}
.intent-choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px}.intent-choice{border:1px solid #d7c4b2;background:#fffaf7;border-radius:12px;padding:18px 14px;text-align:left;cursor:pointer;min-height:118px;color:#1a2a44}.intent-choice:hover{border-color:#b76e79;box-shadow:0 5px 18px rgba(183,110,121,.14)}.intent-choice strong{display:block;font-size:14px;margin-bottom:7px}.intent-choice span{font-size:12px;line-height:1.45;color:#596579}.intent-cancel{margin-top:14px;text-align:right}
#grupo-honorarios-exito{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;background:#fffaf7!important;border:1px solid #ead9cd!important;border-radius:12px!important;padding:16px!important;margin-top:12px!important}#grupo-honorarios-exito .input-group{margin:0!important;background:white;border:1px solid #eadfd5;border-radius:9px;padding:10px}#grupo-honorarios-exito label{font-size:12px!important;color:#1a2a44!important}#grupo-honorarios-exito input,#grupo-honorarios-exito textarea{width:100%!important;box-sizing:border-box!important}
.followup-dash-row{display:grid;grid-template-columns:1.4fr .7fr auto;gap:12px;align-items:center;border-bottom:1px solid #eee4dc;padding:10px 0;font-size:12px}.followup-alerta{color:#b42318;font-weight:700}
@media(max-width:760px){.intent-choice-grid,#grupo-honorarios-exito,.followup-dash-row{grid-template-columns:1fr!important}}
#aba-agente-comercial{display:none!important}

/* V5.1 - assinatura manuscrita real; alteração exclusivamente visual */
.assinatura-real-flavia{display:block!important;width:auto!important;height:auto!important;max-width:210px!important;max-height:78px!important;object-fit:contain!important;margin:0 auto 4px!important;}
@media print{.assinatura-real-flavia{display:block!important;max-width:210px!important;max-height:78px!important;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important;}}

/* ===== V5.2 — PADRÃO DOCUMENTAL UNIVERSAL ===== */
:root{
  --doc-v52-ink:#172a43;
  --doc-v52-accent:#b76e79;
  --doc-v52-line:#dfd5cf;
  --doc-v52-soft:#fbf8f3;
  --doc-v52-muted:#6d6a68;
}

/* Tabelas de identificação/metadata viram cartões com rótulo menor e valor protagonista. */
.doc-table.doc-kv-grid{border-collapse:separate!important;border-spacing:0 7px!important;background:transparent!important;}
.doc-table.doc-kv-grid tbody{display:block!important;width:100%!important;}
.doc-table.doc-kv-grid tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px 10px!important;width:100%!important;margin:0 0 7px!important;}
.doc-table.doc-kv-grid tr > th,
.doc-table.doc-kv-grid tr > td{display:block!important;min-width:0!important;border:0!important;}
.doc-table.doc-kv-grid tr > th:nth-child(1){grid-column:1;grid-row:1;padding:7px 10px 0!important;border:1px solid var(--doc-v52-line)!important;border-bottom:0!important;border-radius:8px 8px 0 0!important;background:var(--doc-v52-soft)!important;color:var(--doc-v52-muted)!important;font-size:10px!important;line-height:1.15!important;letter-spacing:.35px!important;text-transform:uppercase!important;font-weight:700!important;}
.doc-table.doc-kv-grid tr > td:nth-child(2){grid-column:1;grid-row:2;padding:3px 10px 9px!important;border:1px solid var(--doc-v52-line)!important;border-top:0!important;border-radius:0 0 8px 8px!important;background:var(--doc-v52-soft)!important;color:var(--doc-v52-ink)!important;font-size:13px!important;line-height:1.35!important;font-weight:600!important;overflow-wrap:anywhere!important;word-break:normal!important;}
.doc-table.doc-kv-grid tr > th:nth-child(3){grid-column:2;grid-row:1;padding:7px 10px 0!important;border:1px solid var(--doc-v52-line)!important;border-bottom:0!important;border-radius:8px 8px 0 0!important;background:var(--doc-v52-soft)!important;color:var(--doc-v52-muted)!important;font-size:10px!important;line-height:1.15!important;letter-spacing:.35px!important;text-transform:uppercase!important;font-weight:700!important;}
.doc-table.doc-kv-grid tr > td:nth-child(4){grid-column:2;grid-row:2;padding:3px 10px 9px!important;border:1px solid var(--doc-v52-line)!important;border-top:0!important;border-radius:0 0 8px 8px!important;background:var(--doc-v52-soft)!important;color:var(--doc-v52-ink)!important;font-size:13px!important;line-height:1.35!important;font-weight:600!important;overflow-wrap:anywhere!important;word-break:normal!important;}
.doc-table.doc-kv-grid tr.doc-kv-single{grid-template-columns:1fr!important;}
.doc-table.doc-kv-grid tr.doc-kv-single > th:nth-child(1),.doc-table.doc-kv-grid tr.doc-kv-single > td:nth-child(2){grid-column:1!important;}

/* Evita que títulos e cartões pequenos sejam separados do conteúdo. */
.doc-section-title,.titulo-documento-unico h2,.pdf-title{break-after:avoid-page;page-break-after:avoid;}
.doc-kv-grid tr,.doc-assinatura,.prop-assinaturas{break-inside:avoid-page;page-break-inside:avoid;}

@media print{
  @page{size:A4;margin:8mm 8.5mm 9mm!important;}
  html,body{background:#fff!important;}
  .folha-a4,.page,#proposta-impressao,#impugnacao-pdf-box{max-width:none!important;box-shadow:none!important;border:0!important;}
  .doc-table.doc-kv-grid{border-spacing:0 4px!important;margin-bottom:5px!important;}
  .doc-table.doc-kv-grid tr{gap:5px 7px!important;margin-bottom:4px!important;break-inside:avoid-page!important;page-break-inside:avoid!important;}
  .doc-table.doc-kv-grid tr > th:nth-child(1),.doc-table.doc-kv-grid tr > th:nth-child(3){padding:4px 7px 0!important;font-size:6.8pt!important;line-height:1.05!important;border-radius:4px 4px 0 0!important;}
  .doc-table.doc-kv-grid tr > td:nth-child(2),.doc-table.doc-kv-grid tr > td:nth-child(4){padding:2px 7px 5px!important;font-size:8.4pt!important;line-height:1.2!important;border-radius:0 0 4px 4px!important;}
  .doc-section-title{margin-top:8px!important;margin-bottom:5px!important;}
  p,li,td{orphans:3!important;widows:3!important;}
  .texto-corrido,#outRelDecisoes,#outRelDecisoes>div{break-inside:auto!important;page-break-inside:auto!important;}
}
.doc-table.doc-kv-grid tr[style*="display: none"],.doc-table.doc-kv-grid tr[style*="display:none"]{display:none!important;}

/* ===== V5.3 — IDENTIFICAÇÃO EDITORIAL EM DUAS COLUNAS =====
   Ajuste exclusivamente visual: preserva dados, IDs, lógica e persistência. */
.doc-table.doc-kv-grid{
  display:block!important;
  width:100%!important;
  margin:8px 0 16px!important;
  border:0!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:transparent!important;
}
.doc-table.doc-kv-grid tbody{display:block!important;width:100%!important;}
.doc-table.doc-kv-grid tr{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  column-gap:34px!important;
  row-gap:0!important;
  width:100%!important;
  margin:0 0 15px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.doc-table.doc-kv-grid tr > th,
.doc-table.doc-kv-grid tr > td{
  display:block!important;
  min-width:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-align:left!important;
}
.doc-table.doc-kv-grid tr > th:nth-child(1),
.doc-table.doc-kv-grid tr > th:nth-child(3){
  padding:0 0 3px!important;
  color:#596579!important;
  font-size:10px!important;
  line-height:1.15!important;
  letter-spacing:0!important;
  text-transform:none!important;
  font-weight:500!important;
}
.doc-table.doc-kv-grid tr > td:nth-child(2),
.doc-table.doc-kv-grid tr > td:nth-child(4){
  padding:0!important;
  color:var(--doc-v52-ink)!important;
  font-size:12.6px!important;
  line-height:1.28!important;
  font-weight:700!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
.doc-table.doc-kv-grid tr > th:nth-child(1){grid-column:1;grid-row:1;}
.doc-table.doc-kv-grid tr > td:nth-child(2){grid-column:1;grid-row:2;}
.doc-table.doc-kv-grid tr > th:nth-child(3){grid-column:2;grid-row:1;}
.doc-table.doc-kv-grid tr > td:nth-child(4){grid-column:2;grid-row:2;}
.doc-table.doc-kv-grid tr.doc-kv-single{grid-template-columns:1fr!important;}
.doc-table.doc-kv-grid tr.doc-kv-single > th:nth-child(1){grid-column:1!important;grid-row:1!important;}
.doc-table.doc-kv-grid tr.doc-kv-single > td:nth-child(2){grid-column:1!important;grid-row:2!important;}
.doc-table.doc-kv-grid td[colspan]{grid-column:1 / -1!important;}

/* Mesmo desenho nos documentos periciais e pareceres que usam tabelas chave/valor. */
.doc-pericial-preview .doc-table.doc-kv-grid,
#esclarecimento-pdf-box .doc-table.doc-kv-grid,
#pericia-pdf-box .doc-table.doc-kv-grid{background:transparent!important;}

@media print{
  /* margem segura para Ctrl+P: evita texto excessivamente rente/cortado nas bordas */
  @page{size:A4;margin:11mm 12mm 13mm!important;}
  .doc-table.doc-kv-grid{margin:5px 0 9px!important;}
  .doc-table.doc-kv-grid tr{
    column-gap:26px!important;
    margin:0 0 8px!important;
    break-inside:avoid-page!important;
    page-break-inside:avoid!important;
  }
  .doc-table.doc-kv-grid tr > th:nth-child(1),
  .doc-table.doc-kv-grid tr > th:nth-child(3){
    padding:0 0 2px!important;
    font-size:7.2pt!important;
    line-height:1.08!important;
    color:#5f6670!important;
    font-weight:500!important;
  }
  .doc-table.doc-kv-grid tr > td:nth-child(2),
  .doc-table.doc-kv-grid tr > td:nth-child(4){
    padding:0!important;
    font-size:8.7pt!important;
    line-height:1.18!important;
    font-weight:700!important;
  }
}

/* ===== V5.4 — RÓTULOS DOCUMENTAIS SEM QUEBRA =====
   Ajuste exclusivamente visual. Mantém todos os rótulos chave/valor em uma única linha
   (ex.: Processo Nº, Vara do Trabalho, Juros & Correção, Data da Liquidação). */
.doc-table.doc-kv-grid tr > th:nth-child(1),
.doc-table.doc-kv-grid tr > th:nth-child(3){
  white-space:nowrap!important;
  overflow:visible!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
@media print{
  .doc-table.doc-kv-grid tr > th:nth-child(1),
  .doc-table.doc-kv-grid tr > th:nth-child(3){
    white-space:nowrap!important;
    overflow:visible!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
  }
}

/* ===== V5.5 — HIERARQUIA DE NEGRITO DOCUMENTAL =====
   Títulos/seções e rótulos permanecem em negrito; respostas/dados ficam em peso normal.
   Documentos Analisados e cabeçalhos das decisões mantêm o contraste já existente. */
.doc-table.doc-kv-grid tr > th:nth-child(1),
.doc-table.doc-kv-grid tr > th:nth-child(3){
  font-weight:700!important;
}
.doc-table.doc-kv-grid tr > td:nth-child(2),
.doc-table.doc-kv-grid tr > td:nth-child(4),
.doc-table.doc-kv-grid td[colspan]{
  font-weight:400!important;
}
/* Tabelas documentais equivalentes: rótulo em negrito, conteúdo sem negrito. */
.folha-a4 .doc-table th,
.doc-pericial-preview .doc-table th,
#esclarecimento-pdf-box .doc-table th,
#pericia-pdf-box .doc-table th{
  font-weight:700!important;
}
.folha-a4 .doc-table td,
.doc-pericial-preview .doc-table td,
#esclarecimento-pdf-box .doc-table td,
#pericia-pdf-box .doc-table td{
  font-weight:400!important;
}
/* Blocos complementares: o nome do campo continua destacado; a resposta não. */
.folha-a4 .doc-list-box > strong{font-weight:700!important;}
.folha-a4 .doc-list-box > div,
.folha-a4 .doc-list-box li{font-weight:400!important;}
/* Exceção deliberada: Documentos Analisados conserva rótulo normal + resposta em negrito. */
.folha-a4 .mapeamento-grid .doc-item > span{font-weight:400!important;}
.folha-a4 .mapeamento-grid .doc-item > strong{font-weight:700!important;}
/* Títulos numerados e títulos documentais seguem em negrito. */
.folha-a4 .doc-section-title,
.folha-a4 .titulo-documento-unico h2,
.folha-a4 .pdf-title,
.doc-pericial-section h5{font-weight:700!important;}
/* Cabeçalho da decisão/sentença permanece em negrito conforme padrão aprovado. */
#outRelDecisoes > div > div:first-child{font-weight:700!important;}
#outRelDecisoes > div > div:nth-child(2),
#outRelDecisoes > div > div:nth-child(2) p{font-weight:400!important;}

@media print{
  .doc-table.doc-kv-grid tr > th:nth-child(1),
  .doc-table.doc-kv-grid tr > th:nth-child(3){font-weight:700!important;}
  .doc-table.doc-kv-grid tr > td:nth-child(2),
  .doc-table.doc-kv-grid tr > td:nth-child(4),
  .doc-table.doc-kv-grid td[colspan]{font-weight:400!important;}
}

/* V12 - Organização segura da navegação. Não altera persistência nem dados. */
.nav-tabs .nav-dropdown{position:relative;display:inline-flex;align-items:stretch;}
.nav-tabs .nav-dropdown .nav-dropdown-toggle{height:100%;}
.nav-caret{font-size:11px;margin-left:4px;}
.nav-dropdown-menu{display:none;position:absolute;top:calc(100% + 2px);left:0;min-width:230px;background:#fff;border:1px solid #d9dee8;border-radius:8px;box-shadow:0 10px 28px rgba(26,42,68,.16);padding:6px;z-index:9999;}
.nav-dropdown.open .nav-dropdown-menu{display:block;}
.nav-dropdown-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:6px;color:var(--cor-principal-escura);font-weight:600;cursor:pointer;white-space:nowrap;}
.nav-dropdown-menu button:hover{background:#f6f1f2;}
.nav-dropdown .nav-dropdown-toggle.active{background:var(--cor-principal-escura);color:#fff;}

/* V16 — navegação de processos, financeiro e PJC integrado */
.pt-modulos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:4px 0 26px}
.pt-modulo-card{appearance:none;border:1px solid #e6d8d2;border-top:3px solid var(--rose-gold);border-radius:14px;background:#fff;padding:20px 18px;text-align:left;cursor:pointer;box-shadow:0 7px 20px rgba(27,41,64,.05);transition:.18s ease;color:#1b2940}
.pt-modulo-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(27,41,64,.09);border-color:#d4a5ab}
.pt-modulo-card strong{display:block;font-size:16px;margin-bottom:7px}.pt-modulo-card span{display:block;font-size:12px;line-height:1.45;color:#716967}
.arquivo-trabalhista-bottom{margin-top:34px;padding-top:10px;border-top:1px solid #eadfd9}
.pjc-integrado{margin:10px 0 28px;background:#fff;border:1px solid #e6d8d2;border-radius:15px;padding:20px 22px;box-shadow:0 7px 20px rgba(27,41,64,.045)}
.pjc-integrado-head h2{margin:3px 0 5px;color:#1b2940;font-size:20px}.pjc-integrado-head p{margin:0 0 18px;color:#746a67;font-size:12px}.secao-eyebrow{font-size:10px;letter-spacing:1.7px;text-transform:uppercase;color:var(--rose-gold-escuro);font-weight:700}
.pjc-integrado-grid{display:grid;grid-template-columns:1.4fr .8fr;gap:18px;align-items:end}.pjc-modelo-box{border:1px solid #eee3de;border-radius:12px;padding:14px;background:#fbf8f6}.pjc-modelo-box strong,.pjc-modelo-box span{display:block}.pjc-modelo-box span{font-size:11px;color:#756b68;margin:5px 0 10px}
#aba-financeiro .receita-resumo-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;align-items:stretch}
#aba-financeiro .receita-kpi,#aba-financeiro .receita-avulsa-atalho{min-height:164px!important;border-radius:14px!important;box-shadow:0 8px 22px rgba(27,41,64,.055)!important}
#aba-financeiro .receita-kpi-exito{border-top:3px solid var(--rose-gold)!important}

/* Despesas — visual mais limpo, sem mudar a lógica */
#aba-despesas .filtro-financeiro-relatorio{background:#fff!important;border:1px solid #e9ddd6!important;border-top:3px solid #1b2940!important;border-radius:14px!important;box-shadow:0 7px 18px rgba(27,41,64,.045)!important;padding:18px!important}
#aba-despesas #desp-resumo-periodo{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
#aba-despesas #desp-resumo-periodo .gf-kpi{min-height:96px;background:#fff!important;border:1px solid #e9ddd6!important;border-radius:13px!important;padding:16px 18px!important;box-shadow:0 6px 16px rgba(27,41,64,.04)}
#aba-despesas .grid-2>.table-container{border:1px solid #e7dbd5!important;border-top:3px solid var(--rose-gold)!important;border-radius:14px!important;overflow:hidden;background:#fff!important;box-shadow:0 8px 20px rgba(27,41,64,.05)!important}
#aba-despesas .grid-2>.table-container>h3{background:#fff!important;color:#1b2940!important;border-bottom:1px solid #eee3de;padding:17px 18px!important;font-size:15px!important}
#aba-despesas .grid-2>.table-container>div{padding:18px!important;background:#fcfaf9!important}
#aba-despesas table thead th{background:#f8f4f1!important;color:#1b2940!important;font-size:11px!important}
#aba-despesas table tbody tr:hover{background:#fffaf8!important}

/* Gestão financeira — hierarquia visual mais organizada */
#aba-gestao-financeira .filtro-financeiro-relatorio{background:#fff!important;border:1px solid #e9ddd6!important;border-top:3px solid #1b2940!important;border-radius:14px!important;box-shadow:0 7px 18px rgba(27,41,64,.045)!important;padding:18px!important}
#gestao-financeira-painel .gf-hero{background:#fff!important;border:1px solid #e7dbd5!important;border-left:4px solid var(--rose-gold)!important;border-radius:14px!important;padding:20px 24px!important;box-shadow:0 7px 20px rgba(27,41,64,.045)!important}
#gestao-financeira-painel .gf-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-top:16px!important}
#gestao-financeira-painel .gf-kpi{min-height:112px!important;background:#fff!important;border:1px solid #e7dbd5!important;border-radius:13px!important;padding:17px 18px!important;box-shadow:0 6px 16px rgba(27,41,64,.04)!important}
#gestao-financeira-painel #gf-resumo-planejamento-card{grid-column:span 2!important;grid-row:auto!important;min-height:112px!important}
#gestao-financeira-painel .gf-grid{grid-template-columns:1fr 1fr!important;gap:16px!important;margin-top:16px!important}
#gestao-financeira-painel .gf-panel{background:#fff!important;border:1px solid #e7dbd5!important;border-radius:14px!important;box-shadow:0 7px 20px rgba(27,41,64,.045)!important}
@media(max-width:1050px){.pt-modulos{grid-template-columns:repeat(2,1fr)}#aba-financeiro .receita-resumo-grid{grid-template-columns:repeat(2,1fr)!important}#gestao-financeira-painel .gf-kpis{grid-template-columns:repeat(2,1fr)!important}.pjc-integrado-grid{grid-template-columns:1fr}}
@media(max-width:650px){.pt-modulos,#aba-financeiro .receita-resumo-grid,#aba-despesas #desp-resumo-periodo,#gestao-financeira-painel .gf-kpis{grid-template-columns:1fr!important}#gestao-financeira-painel #gf-resumo-planejamento-card{grid-column:auto!important}#gestao-financeira-painel .gf-grid{grid-template-columns:1fr!important}}


/* V17 — refinamentos de navegação, dashboard, financeiro e timers */
.dashboard-bottom-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:18px;align-items:start}
.gf-kpis.gf-kpis-3x3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.gf-bottom-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px;align-items:stretch}
.gf-bottom-3 .gf-panel{margin:0;height:100%}
.gf-plan-lines{display:grid;gap:9px;margin-top:10px}.gf-plan-lines>div{display:flex;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid rgba(27,41,64,.10)}.gf-plan-lines>div:last-child{border-bottom:0;padding-bottom:0}.gf-plan-lines span{font-size:12px}.gf-plan-lines strong{white-space:nowrap;font-size:14px}
.timer-main-slot{margin:0 0 16px}.timer-main-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:#fff;border:1px solid var(--cor-borda);border-top:3px solid var(--cor-principal);border-radius:12px;padding:12px 16px;box-shadow:0 5px 16px rgba(27,41,64,.06)}.timer-main-card>div+div{border-left:1px solid #e5e7eb;padding-left:14px}.timer-main-label{display:block;font-size:10px;font-weight:800;letter-spacing:.05em;color:var(--cor-principal-escura);margin-bottom:6px}.timer-main-row{display:flex;align-items:center;gap:10px}.timer-main-row strong{font-family:Consolas,monospace;font-size:15px}.timer-main-btn{padding:5px 10px!important}
.rel-total-improcedentes{margin-top:8px;padding-top:8px;border-top:1px solid #ddd;text-align:right;font-size:12px}
@media(max-width:900px){.dashboard-bottom-grid,.gf-kpis.gf-kpis-3x3,.gf-bottom-3,.timer-main-card{grid-template-columns:1fr}.timer-main-card>div+div{border-left:0;border-top:1px solid #e5e7eb;padding-left:0;padding-top:12px}}

/* Layout unificado — Processos Cíveis e Laudo Contábil */
.civel-modulos{grid-template-columns:repeat(3,minmax(0,1fr));}
#aba-processos-civeis .header h1,#aba-pericia .header h1{color:var(--cor-principal-escura);}
#aba-processos-civeis #civel-lista{margin-top:28px;}
#aba-processos-civeis #civel-lista>.card{border-top:3px solid var(--rose-gold);border-radius:14px;box-shadow:0 7px 20px rgba(27,41,64,.05);}
#aba-pericia #laudo-home-cards{margin-top:4px;margin-bottom:26px;}
#aba-pericia #laudo-arquivo-section,#aba-pericia #laudo-selecao-section,#aba-pericia #pericia-editor,#aba-pericia #pjc-laudo-integrado{scroll-margin-top:20px;}
@media(max-width:1050px){.civel-modulos{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.civel-modulos{grid-template-columns:1fr!important}}

/* V21 — ajustes visuais pontuais aprovados */
/* Dashboard: Follow-up e Honorários de Êxito com o mesmo peso/largura visual. */
.dashboard-bottom-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;
}
.dashboard-bottom-grid>.dash-panel{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
}

/* Gestão Financeira: sempre 3 cards por linha em desktop. */
#gestao-financeira-painel .gf-kpis.gf-kpis-3x3{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
}
#gestao-financeira-painel .gf-kpis.gf-kpis-3x3 .gf-kpi{
  width:auto!important;
  min-width:0!important;
}
@media(max-width:1050px){
  #gestao-financeira-painel .gf-kpis.gf-kpis-3x3{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:650px){
  .dashboard-bottom-grid,#gestao-financeira-painel .gf-kpis.gf-kpis-3x3{grid-template-columns:1fr!important;}
}


/* V22 — Gestão Financeira: três blocos inferiores lado a lado */
#gestao-financeira .finance-planning-grid,
#gestaoFinanceira .finance-planning-grid,
.finance-planning-grid,
.gestao-financeira-planejamento,
.financial-planning-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
.finance-planning-grid > *,
.gestao-financeira-planejamento > *,
.financial-planning-grid > * {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
}
@media (max-width: 1000px) {
  #gestao-financeira .finance-planning-grid,
  #gestaoFinanceira .finance-planning-grid,
  .finance-planning-grid,
  .gestao-financeira-planejamento,
  .financial-planning-grid {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   V23 — UI/UX GLOBAL
   Camada exclusivamente visual. Não altera Firebase, dados,
   cálculos, coleções, IDs ou fluxos de salvamento.
   ========================================================= */
@media screen {
  :root{
    --ux-navy:#1a2a44;
    --ux-rose:#b76e79;
    --ux-cream:#f8f5ef;
    --ux-surface:#fffdf9;
    --ux-border:#e5d9cc;
    --ux-text:#17233a;
    --ux-muted:#667085;
    --ux-shadow:0 6px 18px rgba(26,42,68,.055);
    --ux-shadow-hover:0 10px 24px rgba(26,42,68,.09);
    --ux-radius:12px;
  }

  html{scroll-behavior:smooth}
  body{color:var(--ux-text);line-height:1.45}
  .container{max-width:1440px;margin-inline:auto}

  /* Navegação global */
  .nav-tabs{
    gap:2px!important;
    justify-content:flex-start!important;
    padding:5px max(12px,calc((100vw - 1440px)/2)) 6px!important;
    scrollbar-width:thin;
  }
  .nav-tabs button,.nav-tabs .nav-btn{
    min-height:42px!important;
    padding:10px 14px!important;
    font-size:13px!important;
    letter-spacing:.01em;
    border-radius:8px 8px 0 0!important;
    transition:background-color .16s ease,color .16s ease,transform .16s ease!important;
  }
  .nav-tabs button:not(.active):hover{transform:translateY(-1px)}
  .nav-tabs button.active{font-weight:800!important}

  /* Cabeçalhos e hierarquia */
  .tab-content>.header,.tab-content>.header.no-print{
    margin-bottom:18px!important;
    padding-bottom:10px!important;
    border-bottom:1px solid var(--ux-border)!important;
  }
  .tab-content>.header h1,.tab-content>.header h2{
    margin:0!important;
    color:var(--ux-navy)!important;
    font-size:24px!important;
    line-height:1.2!important;
    letter-spacing:-.02em;
  }
  h2{color:var(--ux-navy)}
  h3{color:var(--ux-navy)}
  .card-title{letter-spacing:.01em}

  /* Superfícies e cards */
  .card,.gf-panel,.finance-card,.panel,.box{
    border-color:var(--ux-border)!important;
    box-shadow:var(--ux-shadow)!important;
  }
  .card{border-radius:var(--ux-radius)!important}
  .card:hover{box-shadow:0 7px 20px rgba(26,42,68,.065)!important}

  /* Formulários */
  .input-group{margin-bottom:14px}
  .input-group label,label{
    color:#344054;
    font-weight:650;
  }
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{
    min-height:40px;
    border-radius:8px!important;
    border-color:#d9cbbb!important;
    background:#fffdfa!important;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
  }
  textarea{min-height:82px}
  input:not([type="checkbox"]):not([type="radio"]):focus,select:focus,textarea:focus{
    outline:none!important;
    border-color:var(--ux-rose)!important;
    box-shadow:0 0 0 3px rgba(183,110,121,.12)!important;
    background:#fff!important;
  }
  input::placeholder,textarea::placeholder{color:#98a2b3}

  /* Botões e ações */
  .btn,.btn-acao,.btn-primario,.btn-secundario,.btn-abrir-doc{
    min-height:38px;
    border-radius:8px!important;
    font-weight:700!important;
    transition:transform .14s ease,box-shadow .14s ease,filter .14s ease!important;
  }
  .btn:hover,.btn-acao:hover,.btn-primario:hover,.btn-secundario:hover,.btn-abrir-doc:hover{
    transform:translateY(-1px);
    box-shadow:0 5px 12px rgba(26,42,68,.10);
  }
  .btn:active,.btn-acao:active,.btn-primario:active,.btn-secundario:active{transform:translateY(0)}
  button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
    outline:3px solid rgba(183,110,121,.25)!important;
    outline-offset:2px;
  }

  /* Tabelas e listas */
  table{border-collapse:separate;border-spacing:0;width:100%}
  table th{
    background:#f5efe7!important;
    color:var(--ux-navy)!important;
    font-size:12px!important;
    letter-spacing:.025em;
    text-transform:none;
  }
  table th,table td{padding:10px 11px!important;border-color:#eadfd4!important}
  table tbody tr{transition:background .12s ease}
  table tbody tr:hover{background:#fcf8f3}
  .item-arquivo,.card-doc-salvo{transition:background .14s ease,border-color .14s ease}
  .item-arquivo:hover,.card-doc-salvo:hover{background:#fffaf5;border-color:#d8b7bb!important}

  /* Estados e mensagens */
  [class*="sucesso"],[class*="success"]{border-radius:8px}
  [class*="erro"],[class*="error"]{border-radius:8px}
  .empty-state,.estado-vazio{color:var(--ux-muted);text-align:center;padding:24px 16px}

  /* Dashboard e financeiro: densidade e leitura */
  #aba-dashboard .card,#aba-financeiro .card,#gestao-financeira-painel .card,
  #aba-receitas .card,#aba-despesas .card{overflow:hidden}
  .gf-kpis,.dashboard-grid,.kpi-grid{gap:12px!important}
  .gf-kpis .card,.dashboard-grid .card,.kpi-grid .card{min-height:112px}
  .gf-bottom-3{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:14px!important;
    align-items:stretch!important;
  }
  .gf-bottom-3>.gf-panel{height:100%!important;min-width:0!important;margin:0!important}

  /* Agenda: melhor separação visual */
  #aba-agenda .card{border-top:2px solid rgba(183,110,121,.55)!important}
  #aba-agenda button,#aba-agenda select,#aba-agenda input{min-height:38px}

  /* =========================================================
     PADRÃO OPERACIONAL ÚNICO
     Trabalhista + Cível + Laudo Contábil
     ========================================================= */
  #aba-processos-trabalhistas,
  #aba-processos-civeis,
  #aba-pericia{
    --module-gap:12px;
  }
  #aba-processos-trabalhistas>.header,
  #aba-processos-civeis>.header,
  #aba-pericia>.header{
    margin-bottom:16px!important;
  }
  .timer-main-slot,.timer-main-card{
    margin-bottom:14px!important;
  }
  .timer-main-card{
    border:1px solid var(--ux-border)!important;
    border-radius:10px!important;
    box-shadow:var(--ux-shadow)!important;
    background:var(--ux-surface)!important;
  }
  .pt-modulos{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:var(--module-gap)!important;
    margin:12px 0 20px!important;
  }
  #aba-processos-civeis .pt-modulos.civel-modulos{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  .pt-modulo-card{
    position:relative;
    min-height:82px!important;
    padding:15px 14px!important;
    text-align:left!important;
    border:1px solid var(--ux-border)!important;
    border-top:2px solid var(--ux-rose)!important;
    border-radius:11px!important;
    background:var(--ux-surface)!important;
    box-shadow:var(--ux-shadow)!important;
    color:var(--ux-text)!important;
    cursor:pointer;
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease!important;
  }
  .pt-modulo-card strong{
    display:block;
    margin-bottom:5px;
    color:var(--ux-navy)!important;
    font-size:13px!important;
    line-height:1.25;
  }
  .pt-modulo-card span{
    display:block;
    color:#667085!important;
    font-size:11px!important;
    line-height:1.42;
    font-weight:400!important;
  }
  .pt-modulo-card:hover{
    transform:translateY(-2px);
    border-color:#d6a5ac!important;
    background:#fffaf7!important;
    box-shadow:var(--ux-shadow-hover)!important;
  }
  .pt-modulo-card:active{transform:translateY(0)}

  /* PJC e arquivos: segunda e terceira camadas da página */
  #pjc-trabalhista-integrado,#pjc-laudo-integrado,
  #aba-processos-trabalhistas .arquivo-pjc-card{
    border:1px solid var(--ux-border)!important;
    border-radius:12px!important;
    box-shadow:var(--ux-shadow)!important;
  }
  .arquivo-trabalhista-bottom,#laudo-arquivo-section,#civel-lista{
    margin-top:24px!important;
  }
  #aba-processos-trabalhistas .arquivo-trabalhista-bottom h2,
  #aba-pericia #laudo-arquivo-section h2,
  #aba-processos-civeis #civel-lista h3{
    color:var(--ux-navy)!important;
  }

  /* Modais */
  .modal-content{
    border-radius:14px!important;
    border:1px solid var(--ux-border)!important;
    box-shadow:0 20px 50px rgba(26,42,68,.18)!important;
  }
  .modal-content>.header{margin-bottom:16px!important}

  /* Scrollbars discretas em áreas internas */
  .nav-tabs::-webkit-scrollbar,.card::-webkit-scrollbar,.tab-content::-webkit-scrollbar{height:6px;width:6px}
  .nav-tabs::-webkit-scrollbar-thumb,.card::-webkit-scrollbar-thumb,.tab-content::-webkit-scrollbar-thumb{background:#cdbdaf;border-radius:10px}

  /* Responsividade */
  @media(max-width:1100px){
    .pt-modulos{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    #aba-processos-civeis .pt-modulos.civel-modulos{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .gf-bottom-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  }
  @media(max-width:720px){
    .container{padding-left:12px!important;padding-right:12px!important}
    .tab-content>.header h1,.tab-content>.header h2{font-size:21px!important}
    .pt-modulos,#aba-processos-civeis .pt-modulos.civel-modulos,.gf-bottom-3{grid-template-columns:1fr!important}
    .pt-modulo-card{min-height:72px!important}
    .grid-2,.grid-3,.grid-4{grid-template-columns:1fr!important}
    table{font-size:12px}
  }
}


/* =========================================================
   V24 — ESTRUTURA OPERACIONAL PADRONIZADA
   Trabalhista / Cível / Laudo + Dashboard sem vazios
   ========================================================= */
@media screen {
  #aba-processos-trabalhistas > .header,
  #aba-processos-civeis > .header,
  #aba-pericia > .header{margin-bottom:16px!important;}

  #aba-processos-trabalhistas > .timer-main-slot,
  #aba-processos-civeis > .timer-main-slot,
  #aba-pericia > .timer-main-slot{margin-bottom:14px!important;}

  #aba-processos-trabalhistas > .pt-modulos,
  #aba-processos-civeis .pt-modulos,
  #aba-pericia > .pt-modulos{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:12px!important;
    margin:0 0 20px!important;
  }

  #aba-processos-trabalhistas .pjc-integrado,
  #aba-pericia #pjc-laudo-integrado{
    margin:0 0 24px!important;
  }

  .module-archive-section,
  #arquivo-documentos-trabalhistas,
  #arquivo-documentos-civeis,
  #laudo-arquivo-section{
    margin-top:0!important;
    padding-top:0!important;
  }

  .module-archive-section > .header,
  #arquivo-documentos-trabalhistas > .header{
    margin-top:0!important;
    margin-bottom:18px!important;
  }

  /* Dashboard: os dois blocos ficam sempre lado a lado no desktop/tablet,
     com largura e altura equivalentes e sem a coluna vazia. */
  #aba-dashboard .dashboard-bottom-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
    align-items:stretch!important;
    width:100%!important;
  }
  #aba-dashboard .dashboard-bottom-grid > .dash-panel{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    height:100%!important;
    min-height:220px!important;
    box-sizing:border-box!important;
  }

  @media(max-width:900px){
    #aba-processos-trabalhistas > .pt-modulos,
    #aba-processos-civeis .pt-modulos,
    #aba-pericia > .pt-modulos{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    /* intencionalmente mantém os dois blocos do dashboard lado a lado */
    #aba-dashboard .dashboard-bottom-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  }

  @media(max-width:520px){
    #aba-processos-trabalhistas > .pt-modulos,
    #aba-processos-civeis .pt-modulos,
    #aba-pericia > .pt-modulos,
    #aba-dashboard .dashboard-bottom-grid{grid-template-columns:1fr!important;}
  }
}


/* V27 — Agenda alinhada ao padrão visual do sistema */
@media screen {
  #aba-agenda{max-width:1440px;margin:0 auto;padding:0 18px 28px!important}
  #aba-agenda>.header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin-bottom:16px!important}
  #aba-agenda>.header h1,#aba-agenda>.header h2{font-size:24px!important;color:#1a2a44!important;margin:0!important}
  #aba-agenda .agenda-topo,#aba-agenda .tarefas-manuais-card{border:1px solid #e4d8cc!important;border-radius:12px!important;background:#fffdf9!important;box-shadow:0 5px 16px rgba(26,42,68,.055)!important}
  #aba-agenda .agenda-layout{display:grid!important;grid-template-columns:minmax(250px,300px) minmax(0,1fr)!important;gap:16px!important;align-items:start!important}
  #aba-agenda .agenda-sidebar{width:auto!important;min-width:0!important;display:flex!important;flex-direction:column!important;gap:12px!important}
  #aba-agenda .agenda-sidebar>div,#aba-agenda .agenda-coluna-status{border-radius:10px!important;overflow:hidden}
  #aba-agenda .calendar-container,#aba-agenda .calendario-container{width:100%!important;max-width:none!important;min-width:0!important;background:#fffdf9!important;border:1px solid #e4d8cc!important;border-radius:12px!important;box-shadow:0 5px 16px rgba(26,42,68,.055)!important;padding:16px!important}
  #aba-agenda #calendarioGrid{width:100%!important;display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px!important}
  #aba-agenda .day-box{min-height:112px!important;background:#fff!important;border:1px solid #dfd1c4!important;border-radius:7px!important;padding:7px!important;overflow:hidden!important}
  #aba-agenda .day-box.empty{background:#faf7f2!important;border-color:transparent!important}
  #aba-agenda .day-number{font-size:12px!important;font-weight:800!important;color:#1a2a44!important;margin-bottom:5px!important}
  #aba-agenda .task{display:block!important;width:100%!important;box-sizing:border-box!important;margin:3px 0!important;padding:5px 6px!important;border-radius:5px!important;font-size:10px!important;line-height:1.25!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;cursor:pointer!important}
  #aba-agenda .task-manual-v27{background:#b76e79!important;color:#fff!important;border-left:3px solid #1a2a44!important;font-weight:700!important}
  #aba-agenda #mesAnoDisplay{font-size:18px!important;font-weight:800!important;color:#1a2a44!important}
  #aba-agenda .calendar-header,#aba-agenda .calendario-header{display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:12px!important}
  #aba-agenda .tarefa-manual-lista{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;padding:11px 12px!important;border-bottom:1px solid #eee2d7!important;background:#fffdf9!important}
  #aba-agenda .tarefa-manual-lista:last-child{border-bottom:0!important}
  #aba-agenda .tarefa-manual-lista b{color:#1a2a44!important;font-size:13px!important}
  #aba-agenda .tarefa-manual-lista span{color:#667085!important;font-size:11px!important}
  #aba-agenda .tarefa-manual-acoes{display:flex!important;gap:5px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
  #aba-agenda .tarefa-manual-acoes button{min-height:30px!important;padding:5px 9px!important;border-radius:6px!important}
  #aba-agenda .legenda-agenda{display:flex!important;flex-wrap:wrap!important;gap:10px 14px!important;margin-top:12px!important;justify-content:center!important}
  @media(max-width:980px){#aba-agenda .agenda-layout{grid-template-columns:1fr!important}#aba-agenda .agenda-sidebar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}}
  @media(max-width:720px){#aba-agenda{padding:0 10px 22px!important}#aba-agenda .agenda-sidebar{grid-template-columns:1fr!important}#aba-agenda .calendar-container,#aba-agenda .calendario-container{overflow-x:auto!important}#aba-agenda #calendarioGrid{min-width:760px!important}#aba-agenda .day-box{min-height:96px!important}}
}


/* V28 — Tarefa manual: somente calendário + ações no clique */
@media screen {
  #aba-agenda #tarefas-manuais-lista{
    display:none!important;
  }

  #aba-agenda .tarefas-manuais-somente-criacao{
    min-height:0!important;
  }

  #aba-agenda .task-manual-v27{
    background:#c83b45!important;
    color:#fff!important;
    border-left:4px solid #8f1f28!important;
    border-top:0!important;
    font-weight:800!important;
    box-shadow:0 2px 5px rgba(143,31,40,.18)!important;
  }

  #aba-agenda .task-manual-v27:hover{
    background:#b92f39!important;
    transform:translateY(-1px);
  }

  .tarefa-manual-acoes-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    background:rgba(20,31,49,.38);
    align-items:center;
    justify-content:center;
    padding:18px;
  }

  .tarefa-manual-acoes-box{
    width:min(430px,calc(100vw - 36px))!important;
    max-width:430px!important;
    background:#fffdf9!important;
    border:1px solid #e4d8cc!important;
    border-radius:14px!important;
    box-shadow:0 22px 60px rgba(26,42,68,.22)!important;
    padding:20px!important;
  }

  .tarefa-manual-acoes-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    padding-bottom:12px;
    border-bottom:1px solid #eee2d7;
  }

  .tarefa-manual-eyebrow{
    color:#b76e79;
    font-size:10px;
    font-weight:800;
    letter-spacing:.12em;
    margin-bottom:4px;
  }

  .tarefa-manual-acoes-head h3{
    margin:0!important;
    color:#1a2a44!important;
    font-size:18px!important;
  }

  .tarefa-manual-fechar{
    width:32px;
    height:32px;
    min-height:32px!important;
    border-radius:8px!important;
    border:1px solid #dfd1c4!important;
    background:#fff!important;
    color:#1a2a44!important;
    font-size:20px!important;
    line-height:1!important;
    cursor:pointer;
  }

  .tarefa-manual-resumo{
    display:flex;
    flex-direction:column;
    gap:5px;
    padding:16px 0;
  }

  .tarefa-manual-resumo strong{
    color:#1a2a44;
    font-size:15px;
  }

  .tarefa-manual-resumo span{
    color:#667085;
    font-size:12px;
  }

  .tarefa-manual-botoes{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:8px;
  }

  .tarefa-manual-botoes button{
    min-height:40px!important;
    border-radius:8px!important;
    font-weight:800!important;
    cursor:pointer;
  }

  .btn-tarefa-editar{
    background:#fff!important;
    color:#1a2a44!important;
    border:1px solid #cfc2b7!important;
  }

  .btn-tarefa-concluir{
    background:#2d8c5f!important;
    color:#fff!important;
    border:1px solid #2d8c5f!important;
  }

  .btn-tarefa-excluir{
    background:#c83b45!important;
    color:#fff!important;
    border:1px solid #c83b45!important;
  }

  @media(max-width:520px){
    .tarefa-manual-botoes{grid-template-columns:1fr!important}
  }
}


/* V29 — Agenda: tarefa manual não é prazo fatal + tipografia leve + cores da legenda */
@media screen {
  /* Textos das tarefas sem negrito */
  #aba-agenda .task{
    font-weight:400!important;
  }
  #aba-agenda .task-manual-v27{
    font-weight:400!important;
  }

  /* Cores alinhadas à legenda existente */
  #aba-agenda .task-aguardando{
    background:#7b8fa8!important;
    color:#fff!important;
    border-left-color:#61748e!important;
  }
  #aba-agenda .task-inicial{
    background:#2f9145!important;
    color:#fff!important;
    border-left-color:#26793a!important;
  }
  #aba-agenda .task-liquidacao{
    background:#2d6fb7!important;
    color:#fff!important;
    border-left-color:#245c99!important;
  }
  #aba-agenda .task-impugnacao{
    background:#1a2a44!important;
    color:#fff!important;
    border-left-color:#101b2d!important;
  }
  #aba-agenda .task-atualizacao{
    background:#1a2a44!important;
    color:#fff!important;
    border-left-color:#101b2d!important;
  }
  #aba-agenda .task-andamento{
    background:#c9a457!important;
    color:#fff!important;
    border-left-color:#a78745!important;
  }
  #aba-agenda .task-concluido{
    background:#2fb36f!important;
    color:#fff!important;
    border-left-color:#258f59!important;
  }
  #aba-agenda .task-manual-v27{
    background:#c83b45!important;
    color:#fff!important;
    border-left:4px solid #8f1f28!important;
  }

  #aba-agenda .task:hover{
    filter:brightness(.97);
  }
}

/* Ajustes pontuais V30 — sem alteração de dados ou da paleta aprovada da Agenda. */
@media screen {
  /* Os dois painéis inferiores ocupam integralmente a linha, sem coluna residual. */
  #aba-dashboard .dashboard-bottom-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    width:100%!important;
    max-width:none!important;
    gap:14px!important;
  }

  /* Processo Cível usa a mesma matriz de quatro cartões dos demais módulos. */
  #aba-processos-civeis .pt-modulos.civel-modulos{grid-template-columns:repeat(4,minmax(0,1fr))!important;}

  .module-back-btn{
    width:auto!important;
    min-height:auto!important;
    padding:6px 10px!important;
    margin:0 0 12px!important;
    font-size:12px!important;
  }

  /* A célula cresce com os cards: nenhum prazo fica cortado por altura fixa. */
  #aba-agenda .day-box{
    height:auto!important;
    min-height:112px!important;
    overflow:visible!important;
    align-self:stretch!important;
  }
  #aba-agenda .task{
    overflow:visible!important;
    text-overflow:clip!important;
  }

  @media(max-width:900px){
    #aba-processos-civeis .pt-modulos.civel-modulos{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  }
  @media(max-width:520px){
    #aba-processos-civeis .pt-modulos.civel-modulos{grid-template-columns:1fr!important;}
  }
}


/* V31 — ajustes pontuais 28/08/2026 */
@media screen {
  #aba-dashboard .dashboard-bottom-grid{
    grid-column:1 / -1!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    max-width:none!important;
    gap:18px!important;
    align-items:stretch!important;
  }
  #aba-dashboard .dashboard-bottom-grid>.dash-panel{
    min-width:0!important;
    width:auto!important;
    min-height:260px!important;
    height:100%!important;
    padding:18px!important;
  }

  #aba-agenda #calendarioGrid{
    grid-auto-rows:minmax(130px,auto)!important;
    grid-template-rows:none!important;
    align-items:stretch!important;
  }
  #aba-agenda .day-box{
    height:auto!important;
    min-height:130px!important;
    max-height:none!important;
    overflow:visible!important;
    align-self:stretch!important;
  }
  #aba-agenda .task{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    line-height:1.35!important;
    padding:6px 7px!important;
  }
  #aba-agenda .agenda-manual-card-bottom{
    margin-top:16px!important;
    border-top:3px solid #c53030!important;
  }

  .exito-estimado-asterisco{color:#c53030!important;font-weight:900!important;}

  #aba-financeiro .receitas-exito-card{margin-top:20px!important;border-top:3px solid var(--rose-gold)!important;}
  .receitas-exito-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:14px;border-bottom:1px solid #eadfd4;}
  .receitas-exito-head h3{margin:2px 0 4px!important;color:#1a2a44!important}
  .receitas-exito-head p{margin:0;color:#667085;font-size:12px}
  .receitas-exito-head>strong{font-size:24px;color:#2563eb;white-space:nowrap}
  .receitas-exito-item{padding:15px 0;border-bottom:1px solid #eadfd4}
  .receitas-exito-item:last-child{border-bottom:0}
  .receitas-exito-item-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
  .receitas-exito-item-head>div:first-child{display:flex;flex-direction:column;gap:3px}
  .receitas-exito-item-head span{color:#667085;font-size:11px}
  .receitas-exito-valor{color:#2563eb;font-weight:800;font-size:18px;white-space:nowrap}
  .receitas-exito-meta{display:flex;flex-wrap:wrap;gap:8px 18px;margin:9px 0;color:#667085;font-size:11px}
  .receitas-exito-acoes{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
  .receitas-exito-historico{margin-top:10px;background:#fbf8f4;border:1px solid #eadfd4;border-radius:8px;padding:8px 10px}
  .receitas-exito-historico summary{cursor:pointer;color:#1a2a44;font-weight:700;font-size:11px}
  .receitas-exito-historico>div{padding:8px 0;border-bottom:1px solid #eee2d7;font-size:11px;color:#475467}
  .receitas-exito-historico>div:last-child{border-bottom:0}
  .exito-preview-v31{background:#f7f9fc;border:1px solid #dfe5ec;border-radius:10px;padding:12px}
  .exito-preview-v31 span,.exito-preview-v31 small{display:block;color:#667085;font-size:11px}
  .exito-preview-v31 strong{display:block;color:#2563eb;font-size:22px;margin:3px 0}

  @media(max-width:760px){
    #aba-dashboard .dashboard-bottom-grid{grid-template-columns:1fr!important}
    #aba-dashboard .dashboard-bottom-grid>.dash-panel{min-height:0!important}
    .receitas-exito-head,.receitas-exito-item-head{flex-direction:column}
  }
}

/* V32 — fluxo histórico de honorários de êxito */
.exito-ident-v32{font-size:12px;color:#667085;margin-bottom:14px;padding:8px 10px;background:#fbf8f4;border-radius:8px}
.exito-preview-v32{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.exito-preview-v32>div{border:1px solid #e6ddd5;border-radius:9px;padding:11px;background:#fff}
.exito-preview-v32 span{display:block;font-size:10px;color:#667085;margin-bottom:4px}
.exito-preview-v32 strong{display:block;font-size:18px;color:#1a2a44}
.exito-preview-v32>div:last-child strong{color:#2563eb}
.exito-regra-v32{margin-top:9px;font-size:11px;color:#667085}
.receitas-exito-valor small{display:block;font-size:9px;color:#667085;font-weight:500;margin-top:2px;text-align:right}
@media(max-width:760px){.exito-preview-v32{grid-template-columns:1fr}}

/* V33 — Honorários de Êxito: modal, histórico e critérios */
.exito-v33-overlay{background:rgba(18,31,51,.56)!important;backdrop-filter:blur(3px);padding:22px!important}
.exito-v33-modal{width:min(760px,96vw)!important;max-height:92vh!important;overflow:auto!important;border-radius:16px!important;padding:0 24px 24px!important;border-top:5px solid #b76e79!important;box-shadow:0 24px 70px rgba(26,42,68,.25)!important}
.exito-v33-titlebar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:22px 0 16px;border-bottom:1px solid #eadfd4;margin-bottom:18px}
.exito-v33-titlebar h2{margin:2px 0 4px;color:#1a2a44}
.exito-v33-titlebar p{margin:0;color:#667085;font-size:12px}
.exito-v33-close{border:0;background:#f7f3ef;color:#1a2a44;width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer}
.exito-v33-bruto{background:#fbf8f4;border:1px solid #eadfd4;border-radius:12px;padding:14px;margin:8px 0 14px}
.exito-v33-bruto small{display:block;margin-top:5px;color:#667085;font-size:10px}
.money-field-v33{display:flex;align-items:center;border:1px solid #d8dee8;border-radius:8px;background:#fff;overflow:hidden}
.money-field-v33 span{padding:0 10px;color:#667085;font-weight:700}
.money-field-v33 input{border:0!important;border-left:1px solid #e5e7eb!important;border-radius:0!important;font-size:18px!important;font-weight:700!important;color:#1a2a44!important}
.exito-v33-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.exito-v33-preview>div{padding:12px;border:1px solid #e5e7eb;border-radius:10px;background:#f9fbfd}
.exito-v33-preview span{display:block;color:#667085;font-size:10px;margin-bottom:4px}
.exito-v33-preview strong{font-size:18px;color:#1a2a44}
.exito-v33-preview .is-fee{background:#f4f8ff;border-color:#dbeafe}
.exito-v33-preview .is-fee strong{color:#2563eb}
.exito-v33-regra{margin-top:10px;padding:10px 12px;background:#fff8f0;border-left:3px solid #d4a5ab;border-radius:6px;color:#475467;font-size:11px;line-height:1.5}
.exito-v33-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.exito-v33-history{margin-top:14px;border-top:1px solid #eadfd4}
.exito-v33-history-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px 0;border-bottom:1px solid #eee5dc}
.exito-v33-history-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.exito-v33-history-main>b{color:#1a2a44}
.exito-v33-history-main>span,.exito-v33-history-main>small{font-size:10px;color:#667085}
.exito-v33-history-actions{display:flex;gap:6px;flex-shrink:0}
.btn-perigo-v33{border:1px solid #f1b7b7;background:#fff5f5;color:#a61b1b;border-radius:7px;padding:7px 10px;font-weight:700;cursor:pointer}
.btn-perigo-v33:hover{background:#fee2e2}
.exito-criterio-resumo{margin-top:10px;padding:10px 12px;border-radius:8px;background:#fbf8f4;color:#475467;font-size:11px}
#rcr-openai-config-status{margin-left:6px}
@media(max-width:760px){
 .exito-v33-preview{grid-template-columns:1fr}
 .exito-v33-history-row{align-items:flex-start;flex-direction:column}
 .exito-v33-history-actions{width:100%}
}

/* V34 — estabilização visual do fluxo de êxito e atalhos */
.exito-v33-modal{
  width:min(640px,94vw)!important;
  max-height:86vh!important;
  padding:0 22px 20px!important;
}
.exito-v33-titlebar{padding:18px 0 13px!important;margin-bottom:14px!important}
.exito-v33-bruto{padding:11px 12px!important;margin:6px 0 10px!important}
.exito-v33-preview{gap:8px!important;margin-top:9px!important}
.exito-v33-preview>div{padding:9px 10px!important}
.exito-v33-preview strong{font-size:16px!important}
.exito-v33-regra{margin-top:8px!important;padding:8px 10px!important}
.exito-v33-actions{margin-top:13px!important}
.civil-orcamento-atalho{
 display:flex;align-items:center;gap:12px;flex-wrap:wrap;
 margin:12px 0 4px;padding:10px 12px;border:1px solid #eadfd4;
 border-radius:10px;background:#fbf8f4
}
.civil-orcamento-atalho span{font-size:11px;color:#667085}
/* V35 — estabilidade e integração */
.civel-cliente-cadastrado{grid-column:span 2;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px}
.civel-cliente-cadastrado small{color:#64748b;font-size:11px}
#rcr-diagnostico-sistema b{color:var(--cor-principal-escura)}

/* =========================================================
   V37 — RESPONSIVIDADE + ACABAMENTO VISUAL GLOBAL
   Somente interface: não altera Firebase, Auth, coleções ou dados.
   ========================================================= */
@media screen {
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow-x:hidden}
  body{min-width:0;overflow-x:hidden}
  *,*::before,*::after{box-sizing:border-box}
  img,svg,canvas,video{max-width:100%;height:auto}
  .container{width:min(100% - 32px,1440px)!important;max-width:1440px!important;margin:18px auto!important;padding:0!important}
  .tab-content,.card,.panel,.box,.gf-panel,fieldset{min-width:0}
  .header,.header-tela,.calendar-header,.doc-pericial-topbar{gap:12px;flex-wrap:wrap}
  .header>*,.header-tela>*{min-width:0}
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{max-width:100%;width:100%}
  button,.btn,.btn-acao{touch-action:manipulation}

  /* Navegação continua elegante sem estourar a largura */
  .nav-tabs{overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;justify-content:flex-start!important;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
  .nav-tabs button,.nav-tabs .nav-btn{flex:0 0 auto;white-space:nowrap;scroll-snap-align:start}

  /* Grids globais fluidos */
  .dash-row,.dashboard-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .dash-grid-3,.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .dash-grid-2,.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .grid-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .painel-metricas{flex-wrap:wrap}
  .painel-metricas>*{min-width:0}

  /* Tabelas: não deformam o restante da tela */
  .table-container{max-width:100%;overflow-x:auto!important;overflow-y:hidden;-webkit-overflow-scrolling:touch}
  .table-container table{min-width:720px}
  .doc-table{min-width:640px}

  /* Modais sempre dentro da viewport */
  .modal,.modal-overlay,[class*="modal-overlay"]{padding:16px!important}
  .modal-content,.exito-v33-modal{width:min(680px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;margin:auto!important}

  /* Agenda preserva calendário; em telas estreitas vira faixa rolável */
  .calendar-container,.calendar{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .weekdays,.days-grid{min-width:720px}
  .day{min-width:0}

  /* Telas muito grandes: mantém proporção sofisticada */
  @media(min-width:1800px){
    .container{width:min(100% - 64px,1560px)!important;max-width:1560px!important}
    .nav-tabs{padding-left:max(20px,calc((100vw - 1560px)/2))!important;padding-right:max(20px,calc((100vw - 1560px)/2))!important}
    .main-header{padding-top:28px;padding-bottom:18px}
  }

  /* Notebook / tablet horizontal */
  @media(max-width:1180px){
    .container{width:min(100% - 28px,1100px)!important}
    .dash-row,.dashboard-cards,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .dash-grid-3,.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .dados-puxados-grid,.mapeamento-grid,.grid-historico{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .sidebar{width:240px}
  }

  /* Tablet vertical */
  @media(max-width:820px){
    .container{width:calc(100% - 24px)!important;margin:12px auto!important}
    .main-header{padding:16px 12px 12px!important}
    .main-header h1{font-size:21px!important}
    .main-header p{font-size:11px!important}
    .brand-logo-header{max-width:96px!important;max-height:54px!important}
    .nav-tabs{padding:4px 10px 5px!important}
    .nav-tabs button,.nav-tabs .nav-btn{min-height:40px!important;padding:9px 12px!important;font-size:12px!important}
    .header,.header-tela{align-items:flex-start!important}
    .header h1,.header h2,.header-tela h1,.header-tela h2{font-size:21px!important}
    .dash-row,.dashboard-cards,.dash-grid-3,.grid-3,.grid-4,.dados-puxados-grid,.mapeamento-grid,.grid-historico{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .app-layout{flex-direction:column!important}
    .sidebar{width:100%!important;max-width:none!important}
    .sidebar-content{max-height:240px}
    .financial-planning-grid,.finance-planning-grid,.gestao-financeira-planejamento{grid-template-columns:1fr!important}
  }

  /* Celular */
  @media(max-width:600px){
    .container{width:calc(100% - 20px)!important;margin:10px auto!important}
    .main-header{padding:13px 10px 10px!important}
    .brand-logo-header{max-width:82px!important;max-height:46px!important;margin-bottom:5px!important}
    .main-header h1{font-size:18px!important;letter-spacing:.2px!important}
    .main-header p{font-size:10px!important}
    .nav-tabs button,.nav-tabs .nav-btn{min-height:42px!important;padding:9px 11px!important;font-size:11.5px!important}
    .tab-content>.header,.tab-content>.header.no-print{margin-bottom:13px!important;padding-bottom:9px!important}
    .tab-content>.header h1,.tab-content>.header h2,.header-tela h1,.header-tela h2{font-size:19px!important}
    .dash-row,.dashboard-cards,.dash-grid-3,.dash-grid-2,.grid-2,.grid-3,.grid-4,.dados-puxados-grid,.mapeamento-grid,.grid-historico,.doc-pericial-grid,.doc-pericial-meta{grid-template-columns:1fr!important}
    .card{padding:14px!important;border-radius:11px!important}
    .btn,.btn-acao,.btn-primario,.btn-secundario,.btn-abrir-doc{min-height:42px;padding:10px 13px!important;font-size:12px!important}
    .actions{gap:8px!important}
    .actions>.btn,.actions>button{flex:1 1 140px}
    .painel-preco{align-items:flex-start!important;flex-direction:column!important;gap:8px}
    .input-group{margin-bottom:11px!important}
    input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px!important;min-height:43px!important} /* evita zoom automático no iPhone */
    textarea{min-height:78px!important}
    .modal,.modal-overlay,[class*="modal-overlay"]{padding:8px!important;align-items:flex-start!important}
    .modal-content,.exito-v33-modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:12px!important}
    .exito-v33-modal{padding:0 14px 14px!important}
    .exito-v33-titlebar{padding:14px 0 10px!important}
    .table-container{border-radius:10px!important}
    .table-container table{min-width:680px}
    .doc-table{min-width:600px}
    #tooltip-agenda{max-width:calc(100vw - 24px)!important;width:auto!important}
  }

  /* Telefones pequenos */
  @media(max-width:390px){
    .container{width:calc(100% - 16px)!important}
    .main-header h1{font-size:17px!important}
    .nav-tabs button,.nav-tabs .nav-btn{padding-inline:10px!important}
    .card{padding:12px!important}
    .btn,.btn-acao{width:100%;justify-content:center}
    .actions{flex-direction:column!important}
    .actions>*{width:100%!important;flex-basis:auto!important}
  }
}

/* V38 — guia operacional RCR */
.rcr-guia-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.rcr-guia-grid>div{border:1px solid #e7e0d6;border-radius:10px;padding:11px;background:#fbf8f3}
.rcr-guia-grid b{display:block;font-size:12px;color:#1a2a44;margin-bottom:4px}
.rcr-guia-grid small{display:block;color:#64748b;line-height:1.35}
@media(max-width:900px){.rcr-guia-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.rcr-guia-grid{grid-template-columns:1fr}}
/* V39 — RCR operacional + ferramentas em Meus Clientes */
.clientes-tools{margin-top:28px;padding-top:20px;border-top:1px solid var(--cor-borda)}
.clientes-tools-head h2{margin:4px 0 5px;color:var(--cor-principal-escura)}
.clientes-tools-head p{margin:0 0 16px;color:#64748b;font-size:12px}
.clientes-tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.clientes-tool-card{margin:0!important;min-width:0}
.clientes-tool-central{grid-column:1/-1}
.clientes-tool-cloud{grid-column:1/-1}
.rcr-operacao-v39{border-top:3px solid var(--cor-principal);margin-top:16px}
.rcr-v39-ident{display:flex;gap:10px;flex-wrap:wrap;padding:11px 12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;margin:10px 0 12px;font-size:12px}
.rcr-v39-ident span{padding-left:10px;border-left:1px solid #d9dee7}
.rcr-v39-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:760px){.clientes-tools-grid{grid-template-columns:1fr}.clientes-tool-central,.clientes-tool-cloud{grid-column:auto}.rcr-v39-ident{display:block}.rcr-v39-ident span{display:block;border:0;padding:4px 0 0}.rcr-v39-actions .btn{flex:1 1 100%}}
/* V40 — Dashboard financeiro canônico + menu desktop restaurado */
.dash-financial-grid-v40{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.dash-financial-grid-v40 .dash-card{min-width:0}
.dash-financial-grid-v40 small{display:block;margin-top:5px;font-size:10px;line-height:1.35;color:#667085}
.dash-analytics-secondary-v40{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-top:14px}
.dash-reconciliacao-v40{padding:14px 16px!important}
.dash-rec-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.dash-rec-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}
.dash-rec-grid span{padding:8px 10px;border:1px solid #ece4dd;border-radius:8px;background:#fbf8f4;font-size:11px}
.modal-fin-audit-v40{width:min(1180px,calc(100vw - 32px))!important;max-width:min(1180px,calc(100vw - 32px))!important}
@media(min-width:821px){.nav-tabs{overflow:visible!important;flex-wrap:wrap!important;justify-content:center!important;white-space:normal!important}.nav-tabs button,.nav-tabs .nav-btn{white-space:nowrap!important}}
@media(max-width:1180px){.dash-financial-grid-v40{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-rec-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.dash-financial-grid-v40,.dash-rec-grid{grid-template-columns:1fr}.dash-analytics-secondary-v40{grid-template-columns:1fr!important}}
#dash-followups{min-height:40px}

/* V42 — Dashboard compacto + menu em duas linhas */
.dash-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.dash-title-row h2{color:var(--cor-principal-escura);margin:0;font-family:var(--font-titulo)}
.dash-cloud-note{margin:0 0 14px;color:#7b6b63;font-size:11px}
.dash-kpi-primary-v42,.dash-kpi-secondary-v42{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:10px}
.dash-mini-card{background:#fff;border:1px solid #e8e1db;border-radius:11px;padding:11px 13px;min-height:76px;box-shadow:0 4px 12px rgba(27,41,64,.035);display:flex;flex-direction:column;justify-content:center;min-width:0}
.dash-mini-card span{font-size:9.5px;letter-spacing:.035em;font-weight:800;color:#667085;line-height:1.25}
.dash-mini-card strong{display:block;margin-top:5px;font-size:20px;line-height:1.1;color:#1a2a44;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-mini-card.blue{border-top:3px solid #355c9a}.dash-mini-card.green{border-top:3px solid #2f855a}.dash-mini-card.rose{border-top:3px solid #b76e79}.dash-mini-card.red{border-top:3px solid #c53030}.dash-mini-card.neutral{border-top:3px solid #d4c5b9}
.dash-conversao-compacta{padding:12px 15px!important;margin:10px 0 16px!important;min-height:0!important}
.dash-conversao-row{display:flex;align-items:center;gap:15px;margin-top:7px}.dash-conversao-row h2{margin:0;min-width:58px;font-size:20px}.dash-conversao-track{flex:1;height:9px;background:#eee;border-radius:6px;overflow:hidden;border:1px solid #ddd}.dash-conversao-track #barra-conversao{height:100%;background:var(--cor-principal);width:0%;transition:width .5s ease}
.funil-mini{border-radius:8px;padding:9px;text-align:center}.funil-mini h3{margin:5px 0 0}.funil-mini.enviado{background:#fff7ed;border:1px solid #fed7aa}.funil-mini.negociacao{background:#fffbeb;border:1px solid #fde68a}.funil-mini.aprovado{background:#ecfeff;border:1px solid #a5f3fc}.funil-mini.perdido{background:#fef2f2;border:1px solid #fecaca}
.dash-audit-toggle-v42{margin-top:18px;padding-top:12px;border-top:1px solid #ece4dd;text-align:center}
.dash-audit-toggle-v42>.btn{width:auto!important;padding:8px 14px!important;font-size:11px!important}
.dash-reconciliacao-v40[hidden]{display:none!important}.dash-reconciliacao-v40{margin-top:10px!important;text-align:left;background:#fff;border:1px solid #e8e1db;border-radius:11px;padding:12px 14px!important;box-shadow:none!important}
.dash-rec-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#aba-dashboard .dashboard-bottom-grid>.dash-panel{min-height:220px!important}

@media(min-width:821px){
  .nav-tabs{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;overflow:visible!important;white-space:normal!important;gap:0!important}
  .nav-tabs .nav-break-v42{display:block!important;flex-basis:100%!important;width:0!important;height:0!important;padding:0!important;margin:0!important;border:0!important}
  .nav-tabs .nav-btn{white-space:nowrap!important}
}
@media(max-width:820px){.nav-tabs .nav-break-v42{display:none!important}}
@media(max-width:900px){.dash-kpi-primary-v42,.dash-kpi-secondary-v42{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-rec-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:520px){.dash-kpi-primary-v42,.dash-kpi-secondary-v42{grid-template-columns:1fr 1fr;gap:8px}.dash-mini-card{padding:10px;min-height:70px}.dash-mini-card strong{font-size:17px}.dash-mini-card span{font-size:8.5px}.dash-rec-grid{grid-template-columns:1fr!important}}
.exito-dash-summary-v42{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0 10px}.exito-dash-summary-v42 span{border:1px solid #eadfd8;border-radius:8px;padding:8px;background:#fbf8f4;font-size:10px}.exito-dash-summary-v42 b{display:block;color:#1a2a44;font-size:15px;margin-top:3px}.exito-dash-list-v42>div{padding:7px 0;border-top:1px solid #eee5df}.exito-dash-list-v42 b,.exito-dash-list-v42 small{display:block}.exito-dash-list-v42 small{color:#667085;font-size:10px}.rcr-base-explica-v42,.rcr-fontes-v42{margin:10px 0;padding:10px 12px;border:1px solid #e5ded7;border-radius:8px;background:#fbf8f4;color:#475467;font-size:11px;line-height:1.5}.rcr-fontes-v42{margin-top:8px;background:#f7fafc;border-color:#dfe6ee}
@media(max-width:600px){.exito-dash-summary-v42{grid-template-columns:1fr}}
.dash-auditoria-registros-v42{margin-top:12px;padding-top:12px;border-top:1px solid #e8e1db}.dash-auditoria-registros-v42 .table-container{margin-top:10px;max-height:420px;overflow:auto}.dash-auditoria-registros-v42 table{font-size:10px}

/* V43 — módulos técnicos integrados */
.v43-subtabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.v43-subbtn{padding:8px 12px!important;font-size:12px!important}.v43-subbtn.active{background:var(--cor-principal-escura)!important;color:#fff!important}.v43-subpanel>.tab-content,.v43-subpanel .tab-content{display:block!important}.v43-status,.v43-help{font-size:12px;color:var(--cor-texto-medio,#667085);margin:8px 0}.v43-subpanel .header[style*="display: none"]{display:none!important}@media(max-width:820px){.v43-subtabs{overflow-x:auto;flex-wrap:nowrap}.v43-subbtn{flex:0 0 auto}}

/* V44 — restauração visual fiel ao dashboard clássico */
#aba-dashboard{padding-bottom:24px}
#aba-dashboard .dash-filtros-classico{margin-bottom:18px!important;padding:20px 24px!important;border-radius:12px!important}
#aba-dashboard .dash-title-row{margin:0 0 14px!important}
#aba-dashboard .dash-title-row>div:first-child{display:flex;flex-direction:column;gap:5px}
#aba-dashboard .dash-cloud-note{margin:0!important}
#aba-dashboard .dash-kpi-primary-v42,#aba-dashboard .dash-kpi-secondary-v42{gap:18px!important;margin-bottom:14px!important}
#aba-dashboard .dash-mini-card{min-height:92px!important;padding:16px 20px!important;border-radius:12px!important;box-shadow:0 6px 18px rgba(27,41,64,.04)!important}
#aba-dashboard .dash-mini-card span{font-size:11px!important}
#aba-dashboard .dash-mini-card strong{font-size:24px!important;margin-top:12px!important}
#aba-dashboard .dash-conversao-compacta{margin:18px 0 0!important;border-radius:12px!important}
#aba-dashboard .dash-classic-row{margin-top:20px!important;gap:20px!important;align-items:stretch!important}
#aba-dashboard .dash-classic-row>.dash-panel{min-width:0!important;min-height:235px!important;margin:0!important;padding:15px!important;border-radius:12px!important}
#aba-dashboard .dash-classic-row>.dash-panel>h3{margin:0 0 14px!important;padding-bottom:10px!important;border-bottom:1px solid #e5e5e5!important;font-size:15px!important}
#aba-dashboard .dash-grid-3.dash-classic-row>.dash-panel{min-height:235px!important}
#aba-dashboard .dash-final-row>.dash-panel{min-height:250px!important}
#aba-dashboard .dash-funil-classico{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
#aba-dashboard .dash-audit-toggle-v42{margin-top:24px!important;padding:14px 0 0!important;text-align:left!important}
#aba-dashboard .dash-audit-toggle-v42>.btn{background:#f4ede4!important;border:1px solid #d7c5b1!important;color:#1a2a44!important}
@media(min-width:821px){
 .nav-tabs{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-content:flex-start!important;overflow:visible!important;padding:4px 10px 7px!important;gap:0!important}
 .nav-tabs .nav-break-v44{display:block!important;flex-basis:100%!important;width:100%!important;height:0!important}
 .nav-tabs .nav-btn{font-size:12px!important;padding:10px 14px!important;min-height:40px!important}
}
@media(max-width:1050px){#aba-dashboard .dash-grid-2.dash-classic-row{grid-template-columns:1fr!important}#aba-dashboard .dash-funil-classico{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:820px){.nav-tabs .nav-break-v44{display:none!important}#aba-dashboard .dash-mini-card{min-height:78px!important;padding:11px!important}#aba-dashboard .dash-mini-card strong{font-size:18px!important;margin-top:7px!important}}

/* ===== V45: restauração visual V32 + módulos técnicos profissionais ===== */
.v45-dashboard-title{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:20px 0 16px}.v45-dashboard-title h2{color:var(--cor-principal-escura);margin:0;font-family:var(--font-titulo)}.v45-dashboard-title small{display:block;color:#7b6b63;margin-top:8px}.v45-financial-row{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin-bottom:12px}.v45-financial-row .dash-card{min-height:108px;padding:18px 20px!important;border-radius:12px!important}.v45-financial-row .dash-card h2{font-size:24px!important;margin-top:18px!important}.dash-card.rose{border-left:5px solid #b76e79}.v45-conversion{display:flex;align-items:center;gap:20px}.v45-conversion h2{margin:0;min-width:62px}.v45-progress{flex:1;height:12px;background:#eee;border:1px solid #ddd;border-radius:8px;overflow:hidden}.v45-progress #barra-conversao{height:100%;background:var(--cor-principal);width:0%;transition:width .5s ease}.v45-funnel{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:10px}.v45-funnel>div{border:1px solid #dedede;border-radius:8px;padding:10px;text-align:center;background:#fff}.dashboard-bottom-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:20px!important;margin-top:20px}.v45-audit-footer{margin:24px 0 10px}.v45-audit-footer>#dash-reconciliacao-v40{margin-top:12px}.nav-tabs{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-items:center!important;overflow:visible!important;padding:0 10px!important;background:#1a2a44!important}.nav-tabs .nav-btn{flex:0 0 auto!important;white-space:nowrap!important}.v45-menu-break{flex-basis:100%;height:0}.v45-process-card{max-width:none}.v45-process-line{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:10px;align-items:end}.v45-subtabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.v45-sub.active{background:var(--cor-principal-escura)!important;color:#fff!important}.v45-rule-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:10px}.v45-weekdays{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.v45-rule-chip{display:grid;grid-template-columns:1fr auto;gap:3px 10px;border:1px solid #e0d6d0;border-radius:8px;padding:9px 12px;margin:8px 0;background:#fff}.v45-rule-chip small{grid-column:1}.v45-rule-chip button{grid-column:2;grid-row:1/3;border:0;background:transparent;font-size:20px}.v45-card-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.v45-help{font-size:12px;color:#6f625d;margin:10px 0}.v45-med-cols{display:flex;gap:8px 14px;flex-wrap:wrap;border:1px solid #ddd;border-radius:7px;padding:10px;min-height:40px}.table-scroll{overflow:auto}.v45-panel>.card{margin-top:0}
@media(max-width:980px){.v45-financial-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}.v45-rule-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.dashboard-bottom-grid{grid-template-columns:1fr!important}.nav-tabs{overflow-x:auto!important;flex-wrap:nowrap!important}.v45-menu-break{display:none}}
@media(max-width:600px){.v45-financial-row{grid-template-columns:1fr!important}.v45-rule-grid{grid-template-columns:1fr}.v45-process-line{grid-template-columns:1fr}.v45-funnel{grid-template-columns:repeat(2,1fr)}}

/* ===== V46: menu sem rolagem + conversão + relatório técnico ===== */
.nav-tabs.v46-menu-wrap,
.nav-tabs.v46-menu-wrap.nav-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-start!important;
  align-items:center!important;
  align-content:flex-start!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  white-space:normal!important;
  scrollbar-width:none!important;
}
.nav-tabs.v46-menu-wrap::-webkit-scrollbar{display:none!important}
.nav-tabs.v46-menu-wrap .nav-btn{flex:0 0 auto!important;white-space:nowrap!important}
.nav-tabs.v46-menu-wrap .v45-menu-break{display:block!important;flex:0 0 100%!important;width:100%!important;height:0!important}
@media(max-width:980px){
 .nav-tabs.v46-menu-wrap{overflow:visible!important;flex-wrap:wrap!important;white-space:normal!important;padding:4px 8px 7px!important}
 .nav-tabs.v46-menu-wrap .nav-btn{font-size:11px!important;padding:9px 10px!important;flex:0 0 auto!important}
 .nav-tabs.v46-menu-wrap .v45-menu-break{display:block!important}
}
@media(max-width:600px){.nav-tabs.v46-menu-wrap .nav-btn{font-size:10px!important;padding:8px 8px!important}}
.v45-progress{position:relative;background:repeating-linear-gradient(90deg,#ececec 0,#ececec calc(10% - 1px),#cfcfcf calc(10% - 1px),#cfcfcf 10%)!important}
.v45-progress #barra-conversao.v46-striped-progress{background:repeating-linear-gradient(135deg,#1a2a44 0,#1a2a44 10px,#263a59 10px,#263a59 18px)!important}
.v46-report-options{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin:14px 0 18px;padding:14px;border:1px solid #e6ddd7;border-radius:10px;background:#fbf8f4}
.v46-report-options label{display:flex;align-items:center;gap:8px;font-weight:600;color:#1a2a44}
@media(max-width:900px){.v46-report-options{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:520px){.v46-report-options{grid-template-columns:1fr}}

/* === V47 — menu clássico V22, sem rolagem horizontal === */
.nav-tabs,
.nav-tabs.v46-menu-wrap,
.nav-tabs.v46-menu-wrap.nav-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:stretch!important;
  align-content:center!important;
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  white-space:normal!important;
  width:100%!important;
  max-width:none!important;
  padding:0!important;
  gap:0!important;
  background-color:var(--cor-principal-escura)!important;
  border-bottom:2px solid var(--cor-dourado)!important;
  scrollbar-width:none!important;
}
.nav-tabs::-webkit-scrollbar,.nav-tabs.v46-menu-wrap::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.nav-tabs .nav-btn,
.nav-tabs.v46-menu-wrap .nav-btn,
.nav-tabs button{
  flex:0 0 auto!important;
  white-space:nowrap!important;
  background:none!important;
  border:none!important;
  color:white!important;
  padding:15px 20px!important;
  min-height:auto!important;
  cursor:pointer!important;
  font-size:15px!important;
  font-weight:bold!important;
  opacity:.8!important;
  border-radius:0!important;
}
.nav-tabs .nav-btn:hover,.nav-tabs .nav-btn.active,.nav-tabs button:hover,.nav-tabs button.active{
  background-color:var(--cor-fundo)!important;
  opacity:1!important;
  color:var(--cor-principal-escura)!important;
  border-top-left-radius:6px!important;
  border-top-right-radius:6px!important;
  border-bottom:3px solid var(--rose-gold)!important;
}
.nav-tabs .v45-menu-break,.nav-tabs .nav-break-v42,.nav-tabs .nav-break-v44{display:none!important}
@media(max-width:900px){
  .nav-tabs,.nav-tabs.v46-menu-wrap{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;overflow:visible!important;white-space:normal!important}
  .nav-tabs .nav-btn,.nav-tabs.v46-menu-wrap .nav-btn,.nav-tabs button{font-size:12px!important;padding:10px 11px!important;white-space:nowrap!important}
}
@media(max-width:600px){
  .nav-tabs .nav-btn,.nav-tabs.v46-menu-wrap .nav-btn,.nav-tabs button{font-size:11px!important;padding:9px 8px!important}
}


/* === V48 — MENU FIXO EM DUAS LINHAS, SEM ROLAGEM === */
html,body{overflow-x:hidden!important}
.nav-tabs,
.nav-tabs.v46-menu-wrap,
.nav-tabs.v47-classic-menu{
 display:block!important;
 width:100%!important;
 max-width:100%!important;
 overflow:visible!important;
 overflow-x:hidden!important;
 overflow-y:visible!important;
 white-space:normal!important;
 padding:0!important;
 margin:0!important;
 background:var(--cor-principal-escura)!important;
 border-bottom:2px solid var(--cor-dourado)!important;
 scrollbar-width:none!important;
}
.nav-tabs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.nav-row-v48{display:flex!important;flex-wrap:wrap!important;align-items:stretch!important;justify-content:flex-start!important;width:100%!important;max-width:100%!important;overflow:visible!important;white-space:normal!important}
.nav-row-v48-main{border-bottom:0 solid transparent}
.nav-row-v48 .nav-btn{
 flex:0 0 auto!important;
 width:auto!important;
 min-width:0!important;
 white-space:nowrap!important;
 background:none!important;
 border:0!important;
 color:#fff!important;
 padding:12px 14px!important;
 margin:0!important;
 cursor:pointer!important;
 font-size:13px!important;
 line-height:1.15!important;
 font-weight:700!important;
 opacity:.78!important;
 border-radius:0!important;
}
.nav-row-v48 .nav-btn:hover,.nav-row-v48 .nav-btn.active{background:var(--cor-fundo)!important;color:var(--cor-principal-escura)!important;opacity:1!important;border-top-left-radius:6px!important;border-top-right-radius:6px!important;border-bottom:3px solid var(--rose-gold)!important}
@media(min-width:1200px){.nav-row-v48-main .nav-btn{padding-left:12px!important;padding-right:12px!important;font-size:12.5px!important}.nav-row-v48-tools .nav-btn{padding:11px 14px!important;font-size:12.5px!important}}
@media(max-width:1199px){.nav-row-v48 .nav-btn{font-size:11.5px!important;padding:10px 10px!important}}
@media(max-width:700px){.nav-row-v48 .nav-btn{font-size:10.5px!important;padding:9px 8px!important}}
/* Cível: a home deve ocupar toda a largura abaixo dos cronômetros */
#aba-processos-civeis #civel-home{display:block;clear:both;width:100%;margin-top:14px}
#aba-processos-civeis #civel-home .pt-modulos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 18px}
#aba-processos-civeis #civel-home .pt-modulo-card{min-height:122px}
@media(max-width:980px){#aba-processos-civeis #civel-home .pt-modulos{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){#aba-processos-civeis #civel-home .pt-modulos{grid-template-columns:1fr}}

/* ===== V56 ESTABILIZAÇÃO: menu único + módulos técnicos limpos ===== */
html[data-stable-menu="1"], body{overflow-x:hidden}
.stable-nav{display:block!important;width:100%!important;background:#10213a!important;padding:0!important;overflow:visible!important;border-bottom:1px solid #d6a559!important}
.stable-nav-row{display:flex!important;justify-content:center!important;align-items:stretch!important;flex-wrap:wrap!important;gap:0!important;width:100%!important;margin:0 auto!important;overflow:visible!important}
.stable-nav-row .nav-btn{flex:0 0 auto!important;white-space:nowrap!important;padding:12px 12px!important;font-size:12px!important;line-height:1.2!important}
.stable-nav-tools{border-top:1px solid rgba(255,255,255,.08)!important}
.stable-nav .nav-btn.active{border-bottom:3px solid #b76e79!important}
#aba-jornada,#aba-ocorrencias,#aba-leitor-dados{max-width:1260px;margin:0 auto;padding:0 4px 28px}
#aba-jornada>.header,#aba-ocorrencias>.header,#aba-leitor-dados>.header{margin:0 0 14px!important;padding:0!important}
#aba-jornada>.header h1,#aba-ocorrencias>.header h1,#aba-leitor-dados>.header h1{font-size:24px!important;margin:0 0 6px!important;color:#1a2a44!important}
#aba-jornada .v45-process-card,#aba-ocorrencias .v45-process-card{margin-bottom:12px!important;padding:16px 18px!important}
#aba-jornada .card,#aba-ocorrencias .card{border-radius:12px!important;box-shadow:0 3px 12px rgba(26,42,68,.055)!important;border:1px solid #e5d9d3!important}
#aba-ocorrencias .v45-help{display:none!important}
.stable-tech-timer{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff;border:1px solid #e5d9d3;border-left:4px solid #b76e79;border-radius:12px;padding:14px 18px;margin:0 0 16px;box-shadow:0 3px 12px rgba(26,42,68,.05)}
.stable-tech-timer>div:first-child{display:grid;grid-template-columns:auto auto;gap:2px 12px;align-items:center}.stable-tech-timer small{grid-column:1/-1;font-size:10px;letter-spacing:.08em;color:#758195;font-weight:800}.stable-tech-timer strong{font-size:24px;color:#1a2a44;font-variant-numeric:tabular-nums}.stable-tech-timer span{font-size:12px;color:#667085}.stable-tech-timer-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.stable-text-btn{border:0;background:transparent;color:#7a5660;font-weight:700;cursor:pointer;padding:8px}
#leitor-dados-root{max-width:1180px;margin:0 auto}.leitor-shell,.leitor-home-shell{font-family:inherit!important}
@media(max-width:1050px){.stable-nav-row .nav-btn{font-size:11px!important;padding:10px 9px!important}}
@media(max-width:720px){.stable-tech-timer{align-items:flex-start;flex-direction:column}.stable-nav-row{justify-content:flex-start!important}.stable-nav{overflow-x:auto!important}.stable-nav-row{width:max-content!important;min-width:100%!important;flex-wrap:nowrap!important}}


/* V57 — navegação única e estável */
.nav-tabs.stable-nav{display:block!important;overflow:hidden!important;padding:0!important;background:#10213a!important}
.nav-tabs.stable-nav>.stable-nav-row{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:stretch!important;width:100%!important;max-width:100%!important;margin:0 auto!important}
.nav-tabs.stable-nav>.stable-nav-row>.nav-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;white-space:nowrap!important;margin:0!important;padding:12px 14px!important}
.nav-tabs.stable-nav>.stable-nav-tools{border-top:1px solid rgba(255,255,255,.08)!important}
@media(max-width:720px){.nav-tabs.stable-nav{overflow-x:auto!important}.nav-tabs.stable-nav>.stable-nav-row{justify-content:flex-start!important;flex-wrap:nowrap!important;width:max-content!important;min-width:100%!important}}


/* ===== V59 — estabilização visual/operacional ===== */
.nav-tabs.stable-nav{
  display:block!important;
  background:#10213a!important;
  border-bottom:1px solid #d6a559!important;
  padding:0!important;
  overflow:hidden!important;
}
.nav-tabs.stable-nav .stable-nav-row{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:2px!important;
  width:min(100%,1320px)!important;
  margin:0 auto!important;
  padding:4px 10px!important;
  box-sizing:border-box!important;
}
.nav-tabs.stable-nav .stable-nav-tools{
  border-top:1px solid rgba(255,255,255,.08)!important;
}
.nav-tabs.stable-nav .nav-btn{
  flex:0 0 auto!important;
  border:0!important;
  border-radius:7px!important;
  padding:9px 11px!important;
  margin:0!important;
  background:transparent!important;
  color:#f7f2eb!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  transition:background .15s ease,color .15s ease!important;
}
.nav-tabs.stable-nav .nav-btn:hover{background:rgba(255,255,255,.09)!important}
.nav-tabs.stable-nav .nav-btn.active{
  background:#f7f1e8!important;
  color:#10213a!important;
  box-shadow:inset 0 -3px 0 #b76e79!important;
}

/* Modal de intenção: 4 escolhas sem quebra estranha */
.intent-choice-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
@media(max-width:980px){.intent-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:620px){.intent-choice-grid{grid-template-columns:1fr!important}}

/* Leitor de Dados */
#aba-leitor-dados{max-width:1260px!important;margin:0 auto!important;padding:20px 14px 34px!important}
#leitor-dados-root{max-width:1160px!important;margin:0 auto!important;position:relative!important;z-index:1!important}
#leitor-dados-root button,#leitor-dados-root select,#leitor-dados-root input{pointer-events:auto!important}
.leitor-process-card,.leitor-usage-panel,.leitor-toolbar{
  background:#fff!important;
  border:1px solid #e3d6ca!important;
  border-radius:16px!important;
  box-shadow:0 7px 24px rgba(16,33,58,.06)!important;
}
.leitor-process-card{padding:20px!important;margin-bottom:16px!important}
.leitor-process-card label{
  display:block!important;color:#1a2a44!important;font-weight:800!important;font-size:12px!important;letter-spacing:.04em!important
}
.leitor-process-card p{margin:5px 0 14px!important;color:#667085!important;font-size:12px!important}
.leitor-process-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important}
#leitor-processo{
  width:100%!important;min-height:42px!important;border:1px solid #d8c8ba!important;border-radius:10px!important;
  padding:9px 11px!important;background:#fff!important;color:#1a2a44!important;font-weight:650!important
}
#leitor-process-count{display:block!important;margin-top:7px!important;color:#7a6f67!important;font-size:11px!important}
.leitor-process-info{
  margin-top:12px!important;padding:10px 12px!important;border-radius:10px!important;
  background:#f8f4ef!important;color:#667085!important;font-size:12px!important
}
.leitor-process-info b{display:block!important;color:#1a2a44!important;margin-bottom:2px!important}
.leitor-process-info span{display:block!important}
.leitor-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;margin:16px 0!important
}
.leitor-card{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:8px!important;
  min-height:180px!important;padding:22px!important;border:1px solid #decfc2!important;border-radius:16px!important;
  background:#fff!important;color:#1a2a44!important;text-align:left!important;cursor:pointer!important;
  box-shadow:0 7px 22px rgba(16,33,58,.055)!important;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease!important
}
.leitor-card:hover:not(:disabled){transform:translateY(-2px)!important;border-color:#b76e79!important;box-shadow:0 10px 25px rgba(16,33,58,.09)!important}
.leitor-card:disabled{opacity:.48!important;cursor:not-allowed!important;transform:none!important}
.leitor-card .leitor-icon{font-size:25px!important;color:#b76e79!important}
.leitor-card strong{font-size:18px!important;color:#1a2a44!important}
.leitor-card span:not(.leitor-icon){font-size:12px!important;line-height:1.55!important;color:#667085!important}
.leitor-card em{margin-top:auto!important;font-style:normal!important;font-size:11px!important;font-weight:700!important;color:#8b5c65!important}
.leitor-usage-panel{padding:18px!important;margin-top:16px!important}
.leitor-usage-head{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;margin-bottom:12px!important}
.leitor-usage-head>div{display:flex!important;flex-direction:column!important;gap:3px!important}
.leitor-usage-head strong{color:#1a2a44!important;font-size:15px!important}
.leitor-usage-head span{font-size:11px!important;color:#7a6f67!important}
.leitor-usage-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.leitor-usage-card{border:1px solid #eee3da!important;border-radius:12px!important;padding:14px!important;background:#fdfbf8!important}
.leitor-usage-card>div{display:flex!important;justify-content:space-between!important;gap:8px!important;align-items:flex-start!important}
.leitor-usage-card b{color:#1a2a44!important;font-size:12px!important}
.leitor-usage-card p{margin:10px 0 0!important;font-size:12px!important;line-height:1.55!important;color:#596579!important}
.leitor-api-status{font-size:10px!important;font-weight:800!important;border-radius:999px!important;padding:4px 7px!important;background:#f1f3f5!important}
.leitor-api-status.ok{color:#16794b!important;background:#e9f7ef!important}
.leitor-api-status.erro{color:#a04444!important;background:#fff0f0!important}
.leitor-toolbar{
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:14px!important;align-items:center!important;
  padding:14px!important;margin-bottom:12px!important
}
.leitor-toolbar-meta{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
.leitor-toolbar-meta b{color:#1a2a44!important}
.leitor-toolbar-meta span{font-size:11px!important;color:#667085!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.leitor-timer-box{display:flex!important;flex-direction:column!important;align-items:flex-end!important}
.leitor-timer-box small{font-size:9px!important;color:#7a6f67!important;font-weight:800!important}
.leitor-timer-box strong{font-size:20px!important;color:#1a2a44!important;font-variant-numeric:tabular-nums!important}
.leitor-timer-box span{font-size:10px!important;color:#667085!important}
.leitor-frame{display:block!important;width:100%!important;min-height:720px!important;border:1px solid #e3d6ca!important;border-radius:16px!important;background:#fff!important}

/* Agenda — histórico de tarefas concluídas */
#tarefas-manuais-lista{border-radius:12px!important;overflow:hidden!important}
#aba-agenda .tarefa-manual-historico{cursor:pointer!important;outline:none!important}
#aba-agenda .tarefa-manual-historico:hover,#aba-agenda .tarefa-manual-historico:focus{
  background:#fff8f5!important;box-shadow:inset 3px 0 0 #b76e79!important
}

/* Cível sempre com uma área de entrada visível */
#aba-processos-civeis{max-width:1260px;margin:0 auto;padding:0 4px 28px}
#aba-processos-civeis #civel-home{min-height:240px}

@media(max-width:800px){
  .leitor-grid,.leitor-usage-grid{grid-template-columns:1fr!important}
  .leitor-process-row{grid-template-columns:1fr!important}
  .leitor-toolbar{grid-template-columns:1fr!important}
  .leitor-timer-box{align-items:flex-start!important}
}

/* V72 — Receitas alinhadas ao padrão aprovado de Despesas */
#aba-financeiro .receita-filtro-card{
  margin-bottom:18px!important;
  background:#fff!important;
  border:1px solid #e5d9d2!important;
  border-top:3px solid #1b2940!important;
  border-radius:14px!important;
  box-shadow:0 6px 18px rgba(27,41,64,.045)!important;
  padding:18px!important;
}
#aba-financeiro .receita-filtro-grid{
  display:grid!important;
  grid-template-columns:1.35fr 1fr 1fr 1fr 1.15fr!important;
  gap:16px!important;
  align-items:end!important;
}
#aba-financeiro .receita-filtro-grid .input-group{margin-bottom:0!important;}
#aba-financeiro .receita-filtro-grid select,
#aba-financeiro .receita-filtro-grid button{min-height:40px!important;}
#aba-financeiro #receita-resumo-periodo{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
  margin:0 0 18px!important;
  max-width:none!important;
}
#aba-financeiro #receita-resumo-periodo .gf-kpi,
#aba-financeiro #receita-resumo-periodo .receita-avulsa-atalho{
  min-height:104px!important;
  height:auto!important;
  background:#fff!important;
  border:1px solid #e5d9d2!important;
  border-radius:14px!important;
  padding:16px 18px!important;
  box-shadow:0 6px 18px rgba(27,41,64,.04)!important;
  margin:0!important;
}
#aba-financeiro #receita-resumo-periodo .gf-kpi span{
  display:block!important;
  font-size:11px!important;
  color:#756b68!important;
  margin-bottom:8px!important;
}
#aba-financeiro #receita-resumo-periodo .gf-kpi strong{
  display:block!important;
  font-size:20px!important;
  line-height:1.2!important;
  font-weight:800!important;
}
#aba-financeiro #receita-resumo-periodo .receita-kpi-exito{border-top:3px solid var(--rose-gold)!important;}
#aba-financeiro #receita-resumo-periodo .receita-avulsa-atalho{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  text-align:left!important;
  color:#1b2940!important;
  cursor:pointer!important;
  font-family:inherit!important;
  border-top:3px solid #1b2940!important;
}
#aba-financeiro #receita-resumo-periodo .receita-avulsa-mais{font-size:22px!important;color:var(--rose-gold)!important;line-height:1!important;}
#aba-financeiro #receita-resumo-periodo .receita-avulsa-atalho strong{display:block!important;font-size:12px!important;color:#1b2940!important;}
#aba-financeiro #receita-resumo-periodo .receita-avulsa-atalho small{display:block!important;margin-top:4px!important;font-size:10px!important;color:#756b68!important;}
@media(max-width:1150px){
  #aba-financeiro .receita-filtro-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #aba-financeiro .receita-filtro-grid>.receita-imprimir{grid-column:1/-1!important;}
  #aba-financeiro #receita-resumo-periodo{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:650px){
  #aba-financeiro .receita-filtro-grid,
  #aba-financeiro #receita-resumo-periodo{grid-template-columns:1fr!important;}
  #aba-financeiro .receita-filtro-grid>.receita-imprimir{grid-column:auto!important;}
}


/* ===== V73 — IMPRESSÃO LIMPA / SEM FAIXA DE NAVEGAÇÃO ===== */
@media print {
  #v69-navigation.v69-nav,
  #v69-navigation.v69-nav .v69-nav-row,
  #main-navigation.v69-legacy-nav,
  .main-header.no-print {
    display:none!important;
    visibility:hidden!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    overflow:hidden!important;
  }
}

/* V73 — contexto do trabalho no Tratamento de Jornada */
.v45-process-context{margin-top:10px;padding:10px 12px;border:1px solid #e4d8d2;border-radius:8px;background:#fffaf7;line-height:1.45}.v45-process-context b{color:var(--cor-principal-escura)}.v45-process-context small{color:#6f625d}.v45-context-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.v45-context-tags span{display:inline-block;padding:4px 7px;border-radius:999px;background:#f1e7e4;border:1px solid #e0cfca;font-size:11px;color:#554946}

/* V97 — ações financeiras seguras, sem mover nós do sistema */
#aba-financeiro .v97-fin-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch;margin-top:2px}
#aba-financeiro .v97-fin-actions button{width:100%!important;min-height:64px;margin:0!important;border-radius:10px;font-weight:700;white-space:normal}
#v97-recibo-print{display:none}
@media(max-width:850px){#aba-financeiro .v97-fin-actions{grid-template-columns:1fr}}
@media print{
 body.v97-recibo-active>*:not(#v97-recibo-print){display:none!important}
 body.v97-recibo-active #v97-recibo-print{display:block!important;background:#fff!important;color:#26364c!important}
 #v97-recibo-print .v97-recibo{max-width:190mm;margin:0 auto;font:12px Arial,sans-serif;color:#26364c;position:relative;min-height:265mm}
 #v97-recibo-print header{display:flex;align-items:center;gap:14px;border-bottom:2px solid #17283f;padding-bottom:10px}
 #v97-recibo-print header img{width:58px;height:58px;object-fit:contain}#v97-recibo-print header h2{margin:0;color:#a85f73;font-size:21px}#v97-recibo-print header p{margin:4px 0 0;font-size:10px}
 #v97-recibo-print h1{text-align:center;color:#a85f73;font-size:18px;margin:32px 0 26px}#v97-recibo-print p{line-height:1.65;text-align:justify}
 #v97-recibo-print table{width:100%;border-collapse:collapse;margin:18px 0}#v97-recibo-print th{background:#f4eeee;text-align:left;color:#17283f;padding:8px;border-bottom:1px solid #d8c8cc}#v97-recibo-print td{padding:8px;border-bottom:1px solid #eee}#v97-recibo-print td:last-child,#v97-recibo-print th:last-child{text-align:right}
 #v97-recibo-print .v97-resumo{display:grid;grid-template-columns:130px 1fr;margin-top:18px;background:#faf7f7}#v97-recibo-print .v97-resumo>*{padding:7px 10px;border-bottom:1px solid #eee}
 #v97-recibo-print .v97-data{text-align:right;margin-top:34px;margin-bottom:0}#v97-recibo-print .v97-assina{width:290px;margin:78px 0 0 auto;text-align:center;border-top:1px solid #17283f;padding-top:7px}#v97-recibo-print .v97-assina img{display:block;max-width:190px;max-height:58px;object-fit:contain;margin:-62px auto 8px}#v97-recibo-print .v97-assina b,#v97-recibo-print .v97-assina span{display:block;line-height:1.45}
 #v97-recibo-print footer{position:absolute;bottom:0;left:0;right:0;text-align:center;color:#a85f73;font-size:9px;border-top:1px solid #eadce0;padding-top:8px}
}
/* V123 — cronômetro operacional em uma única linha nas telas largas. */
@media (min-width: 1180px) {
  .work-session-v71 {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  .work-session-v71 .ws-context {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 42% !important;
    min-width: 0 !important;
    gap: 7px !important;
  }

  .work-session-v71 .ws-context small {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .work-session-v71 #ws-process-select {
    flex: 1 1 250px;
    min-width: 190px;
    max-width: 360px;
  }

  .work-session-v71 #ws-current {
    flex: 1 1 150px;
    min-width: 90px;
    max-width: 230px;
  }

  .work-session-v71 .ws-actions {
    display: flex !important;
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 5px !important;
  }

  .work-session-v71 .ws-actions button {
    padding: 7px 7px !important;
    white-space: nowrap;
    font-size: 10px !important;
  }

  .work-session-v71 #ws-stage-select {
    width: 138px;
    min-width: 118px;
  }

  .work-session-v71 .ws-clock {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 7px !important;
    white-space: nowrap;
    text-align: right;
  }

  .work-session-v71 .ws-clock > b {
    font-size: 17px !important;
  }

  .work-session-v71 .ws-clock i {
    font-size: 10px;
  }
}
