/* --- CSS LOGIN --- */
    #login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #263238; z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; }
    .login-box { background: white; padding: 40px; border-radius: 10px; text-align: center; width: 300px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
    .login-input { width: 100%; padding: 12px; margin: 15px 0; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; text-align: center; }
    .pass-wrapper { position: relative; width: 100%; margin: 15px 0; }
    .pass-wrapper input { margin: 0; width: 100%; padding-right: 40px; }
    .pass-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #777; cursor: pointer; font-size: 16px; }
    .pass-eye:hover { color: #333; }
    .keep-connected-box { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 15px; font-size: 14px; color: #555; cursor: pointer; width: 100%; white-space: nowrap; }
    .keep-connected-box input { margin: 0; width: 16px; height: 16px; cursor: pointer; }
    .login-btn { width: 100%; padding: 12px; background: #1b5e20; color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: bold; cursor: pointer; }
    .login-btn:hover { background: #2e7d32; }
    @keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); } }
	
/* --- CORREÇÃO DO LAYOUT (GRADE) --- */
    .row { 
        display: flex; 
        gap: 15px; 
        margin-bottom: 15px; 
        align-items: flex-end; 
        width: 100%;
    }
    .col { flex: 1; min-width: 0; }
    .col-2 { flex: 2; min-width: 0; }
    
    /* CAIXA BRANCA (CARD) */
    .card { 
        background: white; 
        padding: 20px; 
        border-radius: 8px; 
        box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
        margin-bottom: 20px;
        border: 1px solid #ddd;
    }

    /* CABEÇALHO COM BOTÃO NA DIREITA */
    .card-header { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        margin-bottom: 20px; 
        border-bottom: 1px solid #eee; 
        padding-bottom: 10px; 
    }
    .card-header h2 { margin: 0; color: #37474f; }

    /* BOTÃO VERMELHO */
    .btn-clean { 
        background: #ef5350; 
        border: none; color: white; 
        padding: 8px 15px; 
        border-radius: 4px; 
        font-size: 13px; font-weight: bold; 
        cursor: pointer; 
        display: flex; align-items: center; gap: 5px; 
    }
    .btn-clean:hover { background: #d32f2f; }
	
        /* --- ESTILOS GERAIS --- */
		
		/* GRID DE ATALHOS TELA INÍCIO */
.grid-atalhos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card-atalho {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.card-atalho:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #ffb300;
}

.card-atalho i { 
    font-size: 30px; 
    color: #1b5e20; 
}

.card-atalho span { 
    font-weight: bold; 
    color: #37474f; 
    font-size: 14px; 
    text-transform: uppercase; 
}
		
		/* --- CORREÇÃO DOS BOTÕES DE IMPORTAÇÃO (LADO A LADO) --- */
.import-box {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 5px !important;
    width: 100% !important;
}

.import-item {
    flex: 1 !important; /* O input ocupa todo o espaço */
    width: auto !important;
}

/* Força o botão a ser um quadrado pequeno */
.import-box button {
    width: 40px !important; 
    height: 38px !important; /* Mesma altura do input */
    margin: 0 !important;
    margin-bottom: 2px !important; /* Ajuste fino para alinhar base */
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important; /* Não deixa esmagar */
}
		
        :root { --sidebar-bg: #263238; --accent: #ffb300; --bg-main: #f4f6f8; --text-dark: #37474f; --green-btn: #1b5e20; }
        body { font-family: 'Segoe UI', sans-serif; margin: 0; display: flex; height: 100vh; background: var(--bg-main); overflow: hidden; }
        
        /* SIDEBAR */
        .sidebar { width: 260px; background: var(--sidebar-bg); color: #cfd8dc; display: flex; flex-direction: column; padding: 25px; overflow-y: auto; }
        /* AQUI ESTÁ O AJUSTE PARA SUBIR O MENU */
        .brand { 
            text-align: center; 
            margin-bottom: 5px; /* Era 30px, mudei para 5px */
            border-bottom: 1px solid #37474f; 
            padding-bottom: 10px; /* Era 20px, mudei para 10px */
        }
        .brand-icon { font-size: 40px; color: var(--accent); margin-bottom: 10px; }
        .brand h1 { color: white; margin: 0; font-size: 16px; line-height: 1.4; text-transform: uppercase; font-weight: bold; letter-spacing: 0.5px; }
        .brand h1 span { color: var(--accent); }
        .brand p { font-size: 11px; margin-top: 5px; color: #b0bec5; }
        .menu-item { background: transparent; color: inherit; border: none; padding: 12px 0; text-align: left; font-size: 14px; cursor: pointer; display: flex; align-items: center; transition: 0.2s; border-right: 3px solid transparent; width: 100%; }
        .menu-item:hover { color: white; padding-left: 5px; }
        .menu-item.active { color: white; font-weight: bold; border-right-color: var(--accent); }
        .menu-item i { margin-right: 12px; width: 20px; text-align: center; color: var(--accent); }
        .security-box { margin-top: auto; border-top: 1px solid #37474f; padding-top: 15px; }
        .btn-sec { width: 100%; padding: 8px; border: none; border-radius: 4px; color: white; cursor: pointer; margin-bottom: 6px; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px; }

        /* MAIN */
        .main { flex: 1; padding: 30px; overflow-y: auto; display: flex; flex-direction: column; }
        .screen {
        display: none; /* Esconde todas as telas por padrão */
        }
        
        .screen.active {
            display: block; /* Só mostra a que tiver a classe active */
        }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

        /* DASHBOARD STYLES */
        .kpi-container { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
        .kpi-card { flex: 1; min-width: 200px; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: flex; align-items: center; border-left: 5px solid #ddd; }
        .kpi-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-right: 15px; color: white; }
        .kpi-info h3 { margin: 0; font-size: 12px; color: #777; text-transform: uppercase; }
        .kpi-info p { margin: 5px 0 0 0; font-size: 22px; font-weight: bold; color: #333; }
        .charts-container { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
        .chart-box { flex: 1; min-width: 400px; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
        .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
        .chart-header h3 { margin: 0; font-size: 16px; color: #37474f; }

        /* --- PRECIFICAÇÃO STYLE (ATUALIZADO PARA VERDE #0e3b2e) --- */
        .prec-container { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); min-height: 600px; }
        .prec-nav-bar { display: flex; gap: 5px; margin-bottom: 0; }
        .prec-nav-btn { flex: 1; padding: 12px 5px; border: 1px solid #999; border-bottom: none; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #e0e0e0 0%, #bdbdbd 100%); color: #555; font-weight: bold; font-size: 12px; cursor: pointer; text-align: center; text-transform: uppercase; text-shadow: 1px 1px 0px rgba(255,255,255,0.5); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); position: relative; }
        
        /* BOTÃO ATIVO VERDE */
        .prec-nav-btn.active { background: linear-gradient(180deg, #1b5e20 0%, #0e3b2e 100%); color: white; border-color: #0e3b2e; text-shadow: 1px 1px 2px rgba(0,0,0,0.6); z-index: 2; box-shadow: 0 -2px 5px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,100,100,0.5); }
        
        /* BARRA DE CONTROLE VERDE */
        .prec-control-bar { background: linear-gradient(180deg, #1b5e20 0%, #0e3b2e 100%); padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; color: white; font-weight: bold; border-top: 2px solid #2e7d32; border-bottom: 2px solid #002211; box-shadow: 0 4px 6px rgba(0,0,0,0.3); margin-bottom: 20px; position: relative; z-index: 1; }
        
        .prec-ctrl-btn { background: transparent; border: none; color: white; font-weight: bold; text-transform: uppercase; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
        .prec-ctrl-btn:hover { text-decoration: underline; color: #ffeb3b; }
        .prec-sub-nav { display: flex; gap: 3px; margin-bottom: 0; padding-left: 10px; }
        .prec-sub-btn { padding: 8px 15px; background: linear-gradient(180deg, #cfd8dc 0%, #b0bec5 100%); border: 1px solid #90a4ae; border-bottom: none; border-radius: 6px 6px 0 0; color: #546e7a; font-size: 11px; font-weight: bold; cursor: pointer; text-transform: uppercase; margin-bottom: -1px; }
        /* Botão Secundário Ativo (DOURADO DA LOGO - Ótimo para leitura) */
        .prec-sub-btn.active-green { 
            background: linear-gradient(180deg, #d4af37 0%, #b8860b 100%); /* Gradiente Dourado */
            border-color: #8b6508; 
            color: #0e3b2e; /* Texto Verde Escuro para contraste perfeito */
            font-weight: 900;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); 
            z-index: 2;
        }
        .prec-content-area { border: 1px solid #ccc; background: #fff; padding: 15px; min-height: 400px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); }
        .prec-tab-content { display: none; } .prec-tab-content.active { display: block; animation: fadeIn 0.3s; }
        .sub-total-banner { background: linear-gradient(180deg, #4caf50 0%, #2e7d32 100%); color: white; padding: 10px; text-align: right; font-weight: bold; font-size: 14px; border-radius: 4px; margin-bottom: 10px; border: 1px solid #1b5e20; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
        .prec-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
        .prec-table th { background: linear-gradient(180deg, #bdbdbd 0%, #9e9e9e 100%); color: #333; font-weight: bold; text-align: center; padding: 10px 8px; border: 1px solid #757575; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
        .prec-table td { border: 1px solid #ccc; padding: 5px; text-align: center; background: #f5f5f5; vertical-align: middle; }
        .prec-table tr:nth-child(even) td { background: #e0e0e0; }
        
        /* INPUTS VERDES NO FOCO */
        .prec-cell-input { width: 100%; border: 1px solid #aaa; background: #fffde7; text-align: center; font-weight: bold; padding: 6px 4px; box-sizing: border-box; color: #333; }
        .prec-cell-input:focus { background: #fff; border-color: #0e3b2e; outline: none; box-shadow: 0 0 3px rgba(14, 59, 46, 0.5); }
        
        .btn-del-row { background: linear-gradient(180deg, #ef5350 0%, #c62828 100%); color: white; border: 1px solid #b71c1c; border-radius: 4px; width: 24px; height: 24px; cursor: pointer; font-weight: bold; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
        .btn-add-row-large { background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%); color: #1565c0; border: 1px dashed #1565c0; font-weight: bold; padding: 10px; width: 100%; margin-top: 10px; cursor: pointer; border-radius: 4px; text-transform: uppercase; font-size: 12px; }
        .btn-add-row-large:hover { background: #bbdefb; }
        
		
		/* --- CORREÇÃO DE LAYOUT (GRID) --- */
.resumo-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Divide a tela em 50% / 50% */
    gap: 20px; 
    align-items: start; 
    width: 100%;
}

.res-left-col, .res-right-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* No celular, fica um embaixo do outro */
@media (max-width: 768px) {
    .resumo-grid { grid-template-columns: 1fr; }
}


        
        /* CARDS VERDES */
        .res-card { border: 2px solid #0e3b2e; border-radius: 10px; overflow: hidden; box-shadow: 3px 3px 8px rgba(0,0,0,0.3); background: #fff; }
        /* Botão da Aba Principal Ativo (Verde Marca) */
        .prec-nav-btn.active { 
            background: linear-gradient(180deg, #145240 0%, #0e3b2e 100%); 
            color: white; 
            border-color: #002211; 
            text-shadow: 1px 1px 2px rgba(0,0,0,0.6); 
            z-index: 2; 
        }

        /* Cabeçalho dos Cards (Era vermelho, agora é Verde Marca) */
        .res-card-header { 
            background: linear-gradient(180deg, #145240 0%, #0e3b2e 100%); 
            color: white; 
            padding: 10px; 
            text-align: center; 
            font-weight: bold; 
            text-transform: uppercase; 
            font-size: 14px; 
            border-bottom: 2px solid #0e3b2e; 
        }
        
        /* Botão de Excluir Linha (X) - Suave para não cansar */
        .btn-del-row { 
            background: #455a64; 
            color: white; 
            border: 1px solid #37474f; 
        }
        .btn-del-row:hover { background: #c62828; } /* Só fica vermelho se passar o mouse */
        
        .res-card-body-split { padding: 10px; display: flex; flex-direction: column; gap: 5px; background: #fff; font-size: 12px; font-weight: bold; color: #333; }
        .res-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dotted #ccc; }
        
        /* TEXTOS VERDES */
        .res-row.total { border-top: 2px solid #0e3b2e; border-bottom: none; padding-top: 8px; font-size: 14px; color: #0e3b2e; }
        .res-row span:last-child { font-family: 'Courier New', monospace; }
        .res-card-body-simple { padding: 15px; text-align: center; font-size: 20px; font-weight: bold; color: #0e3b2e; background: #fff; }
        
        .res-sub-label { display: block; text-align: center; font-size: 10px; color: #777; font-style: italic; margin-top: -5px; margin-bottom: 15px; }
        .prec-inicio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 800px; margin: 0 auto; }
        
        /* INPUTS */
        .label-editable { display: block; font-size: 11px; font-weight: bold; color: #546e7a; margin-bottom: 5px; text-transform: uppercase; border: none; background: transparent; width: 100%; cursor: text; }
        label.static-label { display: block; font-size: 11px; font-weight: bold; color: #546e7a; margin-bottom: 5px; text-transform: uppercase; }
        input:not(.prec-cell-input):not(.label-editable), textarea, select { width: 100%; padding: 10px; border: 1px solid #cfd8dc; border-radius: 4px; box-sizing: border-box; font-family: inherit; font-size: 13px; }
        input:focus { border-color: var(--accent); outline: none; }
        textarea { resize: vertical; }

        /* GERAL BOTOES */
        .btn-big { width: 100%; padding: 12px; border: none; border-radius: 5px; font-size: 14px; font-weight: bold; cursor: pointer; }
        .btn-green { background: #1b5e20; color: white; } .btn-green:hover { background: #2e7d32; }
        .btn-blue { background: #1565c0; color: white; }
        .btn-red { background: #c62828; color: white; }
        .btn-orange { background: #f57c00; color: white; }
        .btn-purple { background: #7b1fa2; color: white; }
        .btn-dynamic { width: 100%; background: #f9f9f9; border: 1px dashed #bbb; color: #666; padding: 8px; font-size: 12px; cursor: pointer; margin-top: 5px; border-radius: 4px; }
        .btn-add-item { background: #e3f2fd; color: #1565c0; border: 1px dashed #1565c0; font-weight: bold; }
        .search-bar { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 20px; font-size: 14px; }
        table { width: 100%; border-collapse: separate; border-spacing: 0; }
        th { text-align: left; background: #f5f5f5; color: #555; padding: 15px; font-size: 12px; font-weight: bold; border-bottom: 1px solid #ddd; }
        td { padding: 15px; background: white; border-bottom: 1px solid #eee; font-size: 13px; color: #333; }
        .action-btn { width: 32px; height: 32px; border: none; border-radius: 4px; color: white; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; transition: 0.2s; }
        .btn-act-edit { background: #1565c0; } .btn-act-pdf { background: #c62828; } .btn-act-fin { background: #2e7d32; } .btn-act-del { background: #fbc02d; color: #333; }
        .btn-act-file { background: #0277bd; } .btn-act-dup { background: #8e24aa; }
        .btn-act-check { background: #43a047; } .btn-act-undo { background: #ff9800; }
        
        .extra-field-box { background: #fff8e1; padding: 10px; border: 1px solid #ffe082; border-radius: 4px; margin-top: 10px; position: relative; }
        .btn-close-extra { position: absolute; top: 5px; right: 5px; color: red; background: none; border: none; cursor: pointer; font-weight: bold; }
        .logo-preview-box { width: 100px; height: 100px; border: 2px dashed #ddd; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 10px; background: #f9f9f9; }
        .logo-preview-box img { max-width: 100%; max-height: 100%; }

        /* COFRE DE ARQUIVO */
        .file-vault-box { background: #f1f8e9; border: 1px solid #c5e1a5; padding: 15px; border-radius: 6px; margin-bottom: 15px; }
        .file-saved-display { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px; border-radius: 4px; border: 1px solid #ddd; margin-top: 10px; }
        .file-icon { font-size: 24px; color: #2e7d32; }
        .file-name-display { font-weight: bold; flex: 1; color: #333; font-size: 13px; word-break: break-all; }

        /* AJUDA & VIDEO */
        details { margin-bottom: 10px; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
        summary { background: #f5f5f5; padding: 12px; cursor: pointer; font-weight: bold; color: #37474f; list-style: none; display: flex; align-items: center; justify-content: space-between; }
        summary::after { content: '+'; font-size: 16px; font-weight: bold; color: #777; }
        details[open] summary::after { content: '-'; }
        .help-content { padding: 15px; background: #fff; font-size: 13px; line-height: 1.6; color: #555; }
        
        .help-video-placeholder { background: #000; color: #fff; height: 320px; display: flex; align-items: center; justify-content: center; border-radius: 6px; margin-bottom: 10px; overflow: hidden; position: relative; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.3); transition: transform 0.2s; }
        .help-video-placeholder:hover { transform: scale(1.01); }
        .play-btn { position: absolute; width: 68px; height: 48px; background: rgba(255,0,0,0.9); border-radius: 14px; display: flex; align-items: center; justify-content: center; transition: 0.2s; z-index: 10; }
        .play-btn::before { content: ''; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent white; }
        .help-video-placeholder:hover .play-btn { background: #ff0000; transform: scale(1.1); }
        .video-thumb { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
        .video-overlay-text { position: absolute; bottom: 20px; color: white; font-weight: bold; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); z-index: 10; }

        /* ALERTAS DE SISTEMA */
        .system-alerts { position: sticky; top: 0; z-index: 100; margin-bottom: 15px; }
        .alert-box { padding: 12px; text-align: center; font-size: 13px; font-weight: bold; display: none; border-bottom: 1px solid rgba(0,0,0,0.1); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
        .backup-alert { background: #ffeb3b; color: #333; }
        .unsaved-alert { background: #ff9800; color: #fff; }

        /* ORÇAMENTO ITENS - ESTILO TABELA */
.section-block { background:#f9f9f9; padding:15px; border-radius:6px; border:1px solid #ddd; }

/* Cabeçalho da Tabela (Verde) */
.orc-header-row {
    display: flex;
    gap: 10px;
    background: #1b5e20;
    color: white;
    padding: 10px;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 10px;
}

/* Linha do Item */
.orc-item-row { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    background: #fff; 
    border: 1px solid #ddd; 
    border-top: none; /* Cola na linha de cima */
    padding: 10px; 
    transition: 0.2s;
}
.orc-item-row:hover { background: #f1f8e9; }

/* Definição das Colunas */
.col-qtd { width: 70px; text-align: center; }
.col-desc { flex: 1; min-width: 0; } /* Ocupa o espaço livre */
.col-unit { width: 110px; text-align: right; }
.col-sub { width: 110px; text-align: right; }
.col-del { width: 30px; text-align: center; display:flex; align-items:center; justify-content:center; }

/* Inputs dentro da tabela */
.orc-item-row input { 
    margin: 0 !important; 
    font-size: 13px; 
    padding: 8px;
    width: 100%;
}

/* Input de Subtotal (Bloqueado e Verde) */
.item-sub {
    background: #e8f5e9 !important;
    border: 1px solid #c8e6c9 !important;
    color: #2e7d32 !important;
    font-weight: bold;
    text-align: right;
    pointer-events: none; /* Não clicável */
}


/* --- ATUALIZAÇÃO PARA O CAMPO DE DESCRIÇÃO (TEXTAREA) --- */
.orc-item-row textarea.item-desc {
    width: 100%;
    margin: 0 !important;
    padding: 8px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical; /* Permite puxar pra baixo se precisar */
    min-height: 38px; /* Altura mínima igual aos outros campos */
    height: auto;
    white-space: pre-wrap; /* Quebra linha automatico */
    overflow: hidden;
}

/* Resumo Final */
.orc-resumo { margin-top: 20px; padding-top: 15px; border-top: 1px solid #ddd; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.orc-label { font-size: 12px; color: #666; font-weight: bold; }
.orc-total { font-size: 24px; font-weight: bold; color: #1b5e20; }

        /* FINANCEIRO V3 */
        .fin-header-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap:10px; }
        .fin-btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
        .fin-year-selector { font-size: 18px; font-weight: bold; color: #37474f; display: flex; align-items: center; gap: 10px; }
        .fin-year-btn { border: none; background: #eceff1; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-weight: bold; }
        
        .fin-month-strip { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 15px; border-bottom: 1px solid #eee; }
        .fin-month-btn { flex: 1; min-width: 80px; padding: 10px; border: none; background: white; border-radius: 6px; cursor: pointer; font-size: 13px; color: #555; text-align: center; transition: 0.2s; border: 1px solid transparent; }
        .fin-month-btn:hover { background: #f5f5f5; }
        .fin-month-btn.active { background: #5c6bc0; color: white; font-weight: bold; box-shadow: 0 2px 5px rgba(92,107,192,0.3); }

        .fin-summary-footer { background: #f1f8e9; border-top: 2px solid #c5e1a5; padding: 20px; margin-top: 20px; border-radius: 0 0 5px 5px; }
        .fin-summary-row { display: flex; justify-content: flex-end; gap: 30px; text-align: right; }
        .fin-sum-item label { display: block; font-size: 11px; color: #555; text-transform: uppercase; margin-bottom: 3px; }
        .fin-sum-item span { font-size: 16px; font-weight: bold; }
        .text-rec { color: #2e7d32; } .text-desp { color: #c62828; } .text-bal { color: #1565c0; }

        /* STATUS BADGES FINANCEIRO */
        .fin-badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; display: inline-block; }
        .fin-pago { background: #c8e6c9; color: #2e7d32; } 
        .fin-parcial { background: #e3f2fd; color: #1565c0; }
        .fin-pendente { background: #ffe0b2; color: #ef6c00; } 

        .status-bar-container { display: flex; height: 25px; width: 100%; background: #e0e0e0; border-radius: 12px; overflow: hidden; margin-bottom: 20px; font-size: 11px; font-weight: bold; color: white; text-transform: uppercase; }
        .sb-segment { display: flex; align-items: center; justify-content: center; height: 100%; transition: width 0.5s; }
        .bg-orange { background: #ffa726; } .bg-green { background: #66bb6a; } .bg-red { background: #ef5350; }
        .status-badge { padding: 5px 10px; border-radius: 15px; font-size: 11px; font-weight: bold; color: white; cursor: pointer; display: inline-block; min-width: 80px; text-align: center; }
        .status-badge:hover { opacity: 0.8; transform: scale(1.05); transition: 0.2s; }
        .status-legend { display: flex; gap: 15px; font-size: 12px; color: #555; margin-bottom: 10px; justify-content: center; }
        .legend-item { display: flex; align-items: center; gap: 5px; }
        .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

        /* MODAIS */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; display: none; align-items: center; justify-content: center; }
        .modal-box { background: white; padding: 25px; border-radius: 8px; width: 350px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); animation: fadeIn 0.3s; }
        .status-option { width: 100%; padding: 12px; margin: 5px 0; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; font-weight: bold; text-align: left; transition: 0.2s; background: #fff; }
        .status-option:hover { background: #f5f5f5; border-color: #bbb; }
        .status-option.sel-em { color: #f57c00; border-left: 5px solid #f57c00; }
        .status-option.sel-ac { color: #2e7d32; border-left: 5px solid #2e7d32; }
        .status-option.sel-re { color: #c62828; border-left: 5px solid #c62828; }

       /* --- CSS DE IMPRESSÃO UNIFICADO FINAL (ORÇAMENTO + RDO) --- */
/* --- CONFIGURAÇÃO DE IMPRESSÃO TÉCNICA RDO --- */
@media print {
    /* Mantém cores de fundo e bordas visíveis no PDF */
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    
    body { background: white !important; margin: 0; padding: 0; }
    .sidebar, .main, .no-print, .system-alerts, .btn-suporte-float { display: none !important; }

    /* Garante que todas as tabelas usem a borda fina e se sobreponham */
    .rdo-print-table { 
        width: 100% !important; 
        border-collapse: collapse !important; 
        margin-top: -1pt !important; /* Faz a tabela de baixo encavalar na de cima */
        table-layout: fixed !important;
    }

    
    .rdo-header-title { 
        font-size: 16pt; font-weight: bold; text-transform: uppercase; 
        text-align: center !important; background: #e0e0e0 !important; color: black !important; 
    }

    /* ESTILO DA BORDA DO QUADRO DE ATIVIDADES */
    .pdf-content {
        border: 1pt solid #000 !important;
        border-top: none !important; /* Remove a borda superior para não dobrar a linha */
        margin-top: -1pt !important; /* Encaixe perfeito no título cinza */
        padding: 8px !important;
        text-align: left !important;
        font-size: 9pt !important;
        min-height: 150px; 
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* ESTILO DO TÍTULO CINZA (ATIVIDADES EXECUTADAS) */
    .pdf-section-title {
        background-color: #e0e0e0 !important;
        border: 1pt solid #000 !important;
        color: #000 !important;
        font-weight: bold !important;
        padding: 4px 8px !important;
        margin-top: -1pt !important;
        text-align: center !important;
        text-transform: uppercase;
    }
}

@media print {
    /* Oculta o modal de confirmação e o fundo escuro na impressão */
    .modal-overlay, #modal-pergunta, .modal-box {
        display: none !important;
    }
    
    /* Garante que o botão de suporte e botões de ação não apareçam */
    .btn-suporte-float, .btn-clean, .btn-green, .btn-blue, .btn-dynamic {
        display: none !important;
    }
}

@media print {
            .sidebar, .main, .no-print, .system-alerts { display: none !important; } 
            body { background: white; margin: 0; padding: 0; font-family: 'Times New Roman', serif; }

            .sidebar, .main, .no-print, .system-alerts { display: none !important; } 
            body { background: white; margin: 0; padding: 0; font-family: 'Times New Roman', serif; } 
            #print-area, #print-contrato, #print-financeiro, #print-recibo { display: none; width: 100%; }
            .print-container { width: 100%; border-collapse: collapse; }
            .print-container thead { display: table-header-group; }
            .print-container tfoot { display: table-footer-group; }
            .print-container tbody { display: table-row-group; }
            .pdf-header-content { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 15px; margin-bottom: 20px; padding-top: 20px; }
            .pdf-logo-area { width: 100px; margin-right: 20px; }
            .pdf-logo-area img { max-width: 100%; max-height: 80px; }
            .pdf-title-area { flex: 1; }
            .pdf-title h1 { margin: 0; font-size: 20pt; text-transform: uppercase; } 
            .pdf-title p { margin: 2px 0; font-size: 10pt; color: #555; }
            .pdf-info { text-align: right; font-size: 9pt; }
			
			
            /* SUBSTITUA ESTE BLOCO NO SEU CSS (@media print) */
.pdf-section-title {
    background-color: #e0e0e0 !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    text-align: left !important;      /* Títulos à Esquerda */
    font-size: 8pt !important;        /* Tamanho Pequeno */
    font-weight: bold !important;
    padding: 3px 8px !important;
    margin-top: 10px !important;
    text-transform: uppercase;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.pdf-content {
        border: 1px solid #000 !important;
        border-top: none !important;
        padding: 8px !important;
        text-align: justify !important;
        font-size: 10pt !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
        white-space: pre-wrap !important; /* Mantém as quebras de linha que você der */
        
        /* AQUI ESTÁ A CORREÇÃO: */
        height: auto !important;      /* Altura automática (cresce com o texto) */
        min-height: 20px !important;  /* Altura mínima pequena (só para não sumir se vazio) */
    }
            
            /* TABELA PDF AJUSTADA (7 COLUNAS) */
            .pdf-table { width: 100%; border-collapse: collapse; border: 1px solid #000; margin-top: 0; table-layout: fixed; } 
            .pdf-table th, .pdf-table td { border: 1px solid #000; padding: 4px; text-align: center; font-size: 8pt; overflow: hidden; white-space: nowrap; vertical-align: middle; } 
            #print_fin_table td:nth-child(2) { white-space: normal; }

            .fin-badge { padding: 1px 3px !important; font-size: 7pt !important; border-radius: 3px !important; display: inline-block; line-height: 1.1; border: 1px solid #ccc; }

            /* SUBTITUA O BLOCO DAS COLUNAS DO PDF POR ESTE: */

            /* Ajuste de colunas do financeiro (Soma = 100%) */
            #print_fin_table th:nth-child(1) { width: 10%; }  /* Data */
            #print_fin_table th:nth-child(2) { width: 28%; text-align: left; } /* Descrição (AUMENTOU) */
            #print_fin_table th:nth-child(3) { width: 8%; }   /* Tipo */
            #print_fin_table th:nth-child(4) { width: 10%; }  /* Forma */
            #print_fin_table th:nth-child(5) { width: 10%; }  /* Status */
            #print_fin_table th:nth-child(6) { width: 12%; }  /* Dt Pgto */
            #print_fin_table th:nth-child(7) { width: 15%; text-align: right; font-weight: bold;} /* Valor (DIMINUIU e ALINHOU DIREITA) */
            
            /* Garante que o conteúdo da célula de valor também fique à direita */
            #print_fin_table td:nth-child(7) {
                text-align: right !important;
                padding-right: 5px;
            }
            
            .pdf-total-row td { border-top: 2px solid #000; font-weight: bold; } 
            .contrato-title { text-align: center; font-weight: bold; font-size: 14pt; margin-bottom: 20px; text-decoration: underline; }
            .contrato-preambulo { text-align: justify; margin-bottom: 15px; font-size: 11pt; line-height: 1.5; }
            .contrato-clausula { font-weight: bold; margin-top: 15px; margin-bottom: 5px; font-size: 11pt; text-transform: uppercase; }
            .contrato-texto { text-align: justify; margin-bottom: 10px; font-size: 11pt; line-height: 1.5; white-space: pre-wrap; }
            .pdf-footer-content { margin-top: 20px; text-align: center; font-size: 10pt; padding-bottom: 10px; }
            .signature-section { display: flex; justify-content: center; margin-top: 50px; padding-bottom: 20px; page-break-inside: avoid; }
            .sig-block { text-align: center; width: 45%; font-size: 10pt; margin: 0 10px; }
            .sig-line { border-top: 1px solid #000; margin-bottom: 5px; }
            .orc-signature-style { text-transform: uppercase; font-weight: bold; color: #000; font-size: 11pt; margin-bottom: 3px; }
            .orc-cargo-style { font-weight: normal; text-transform: none; color: #000; font-size: 10pt; }

            /* RECIBO STYLE V3.7 */
            .recibo-box { border: 2px solid #000; padding: 25px; margin-top: 10px; }
            .recibo-title { text-align: center; font-weight: bold; font-size: 18pt; margin-bottom: 20px; text-transform: uppercase; }
            .recibo-valor { float: right; border: 2px solid #000; padding: 5px 10px; font-weight: bold; font-size: 14pt; background: #eee; }
            .recibo-body { font-size: 11pt; line-height: 1.6; margin-top: 40px; text-align: justify; }
            .recibo-pagador-box { border: 1px dashed #777; padding: 10px; margin: 15px 0; background: #f9f9f9; font-size: 10pt; }
            .recibo-footer { margin-top: 60px; text-align: center; font-size: 11pt; }
        }
		
		/* --- BOTÃO ZAP (POSIÇÃO CORRIGIDA - CANTO INFERIOR) --- */
.btn-suporte-float {
    position: fixed;
    bottom: 30px !important;      /* ERA 82px -> Baixei para 30px (Fica mais bonito) */
    right: 20px !important;
    width: 50px !important;       /* Ajustei para 50px (Padrão visual) */
    height: 50px !important;
    font-size: 28px !important;
    background-color: #25D366; 
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000; 
    text-decoration: none;
    transition: transform 0.3s;
    cursor: pointer;
    border: 2px solid white;
}

.btn-suporte-float:hover {
    transform: scale(1.1); 
}

/* Opcional: Texto "Suporte" ao passar o mouse */
.btn-suporte-float::after {
    content: "Falar no Zap";  
    position: absolute;
    right: 60px !important;       
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}
.btn-suporte-float:hover::after { opacity: 1; }

/* Esconde na impressão */
@media print {
    .btn-suporte-float { display: none !important; }
}

	
	/* --- ESTILOS DO RDO (FOTOS E IMPRESSÃO) --- */
    .rdo-photo-card {
        width: 48%; /* 2 fotos por linha na tela */
        background: white;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    /* Procure por volta da linha 216 */
.rdo-photo-img {
    width: 100%;
    height: auto; /* Permite que a foto mostre a proporção real */
    max-height: 250px; /* Evita que fotos verticais fiquem gigantes na tela */
    object-fit: contain; /* Garante que a imagem inteira apareça no quadro */
    background-color: #f0f0f0; 
    border-radius: 4px;
    border: 1px solid #eee;
    display: block;
}
    .rdo-btn-remove {
        background: #ef5350; color: white; border: none; padding: 5px; cursor: pointer; width: 100%; font-size: 12px; font-weight: bold; border-radius: 4px; margin-top: 5px;
    }

    /* --- TABELAS ESPECÍFICAS DO PDF RDO --- */
    @media print {
        /* Garante que o fundo das células saia colorido/cinza */
        * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
        
        .rdo-print-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; font-size: 10pt; page-break-inside: avoid; }
        .rdo-print-table th, .rdo-print-table td { border: 1px solid #000; padding: 4px 6px; vertical-align: middle; }
        .rdo-print-table th {
        text-align: left !important; /* Alinha títulos internos à esquerda */
        padding-left: 8px !important;
        font-size: 8pt !important;   /* Deixa o texto das colunas menor */
    }
}
        
        .rdo-header-title { font-size: 16pt; font-weight: bold; text-transform: uppercase; text-align: center; background: #333; color: white; padding: 5px; }
        
        /* Grade de fotos no PDF (2 por linha) */
        .rdo-print-gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
        .rdo-print-photo-item { width: 48%; border: 1px solid #000; margin-bottom: 10px; page-break-inside: avoid; }
        /* Procure por volta da linha 236 */
.rdo-print-img {
    width: 100%;
    height: auto; /* Ajusta a altura conforme a foto original */
    max-height: 350px; 
    object-fit: contain;
    display: block;
    background-color: #fff;
    border-bottom: 1px solid #000;
}
        .rdo-print-caption { padding: 5px; font-size: 9pt; font-weight: bold; background: #fff; min-height: 20px; }
        
        /* Assinaturas RDO */
        .rdo-sig-box { border: 1px solid #000; padding: 20px; text-align: center; margin-top: 10px; page-break-inside: avoid; }
    	
	/* --- CSS RDO DEFINITIVO (BOTOES LADO A LADO) --- */
    .rdo-add-box {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        background: #f5f5f5;
        padding: 8px;
        border-radius: 6px;
        border: 1px solid #ddd;
        margin-bottom: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    /* Faz os campos ocuparem o espaço e o botão ficar parado na ponta */
    .rdo-add-box > div { flex: 1 1 auto !important; min-width: 0; }
    .rdo-add-box button { 
        flex: 0 0 40px !important; 
        height: 38px !important; 
        margin: 0 !important; 
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .rdo-mini-table {
        width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 15px;
    }
    .rdo-mini-table th { background: #cfd8dc; color: #37474f; padding: 5px; text-align: left; }
    .rdo-mini-table td { border-bottom: 1px solid #eee; padding: 5px; }
    .rdo-mini-table tr:hover { background: #f1f8e9; }

    /* AJUSTE DO PDF (CINZA CLARO AO INVÉS DE PRETO) */
    @media print {
        .rdo-header-title { 
            background-color: #e0e0e0 !important; /* Cinza Claro */
            color: #000 !important; /* Texto Preto */
            border: 1px solid #999 !important;
        }
        .pdf-section-title {
            background-color: #f5f5f5 !important; /* Cinza bem clarinho */
            color: #000 !important;
            border: 1px solid #000 !important;
            text-align: center !important; /* Centralizado */
        }
        /* Ajuste da tabela de prazos para não parecer descentralizado */
        .rdo-print-table td { text-align: center !important; }
    }
	
	/* ... outros estilos que já existem ... */

    /* --- CSS PARA PASTAS DO RDO (Cole aqui) --- */
    .folder-row { cursor: pointer; transition: background 0.2s; }
    .folder-row:hover { background-color: #e3f2fd !important; }
    .folder-icon { font-size: 24px; color: #ffb300; margin-right: 10px; }
    /* ... resto do código CSS ... */
	
	/* ... outros estilos que já existem acima ... */

    .rdo-mini-table tr:hover { background: #f1f8e9; }

    /* COLOQUE AQUI: Estilos para as pastas do RDO */
    .folder-row:hover {
        background-color: #e3f2fd !important; /* Cor azul clara ao passar o mouse */
    }
    .folder-icon {
        font-size: 24px;
        color: #ffb300; /* Cor amarela para o ícone de pasta */
        margin-right: 10px;
    }

/* --- CORREÇÃO DO SCROLL NO MODAL ADMIN --- */
#modal-admin .card { 
    width: 95%; 
    max-width: 950px; 
    margin: 20px auto; /* Menos margem para caber em telas pequenas */
    border-radius: 10px;
    background: white;
    max-height: 90vh; /* Ocupa no máximo 90% da altura da tela */
    display: flex;
    flex-direction: column; /* Organiza em coluna: Header fixo, corpo rolável */
    overflow: hidden; /* Esconde o que passar do card */
}

/* O corpo onde fica a tabela e os gráficos ganha rolagem */
#modal-admin .card-body-scroll {
    flex: 1; /* Ocupa todo o espaço restante */
    overflow-y: auto; /* Adiciona barra de rolagem se precisar */
    padding: 20px;
}

/* TELA DE CARREGAMENTO PROFISSIONAL */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #263238; z-index: 100000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.loader-spinner {
    width: 50px; height: 50px; border: 5px solid #f3f3f3;
    border-top: 5px solid #ffb300; border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 20px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* --- MODO ESCURO (DARK MODE) --- */
body.dark-mode { background-color: #121212; color: #e0e0e0; }
body.dark-mode .top-bar { background-color: #1e1e1e !important; border-bottom: 1px solid #333 !important; }
body.dark-mode .top-bar h3, body.dark-mode .top-bar span, body.dark-mode .top-bar button { color: #e0e0e0 !important; }

/* Cards e Paineis */
body.dark-mode .card, body.dark-mode .prec-container, body.dark-mode .res-card { 
    background-color: #1e1e1e !important; 
    border-color: #333 !important; 
    color: #e0e0e0 !important; 
}
body.dark-mode .card-header h2, body.dark-mode h3, body.dark-mode h2 { color: #81c784 !important; } /* Títulos em verde claro */

/* Inputs e Selects */
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background-color: #2c2c2c !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}
body.dark-mode label.static-label { color: #bbb !important; }

/* Tabelas */
body.dark-mode table th { background-color: #333 !important; color: #fff !important; border-color: #444 !important; }
body.dark-mode table td { background-color: #1e1e1e !important; color: #ddd !important; border-color: #333 !important; }
body.dark-mode .rdo-mini-table tr:hover { background-color: #333 !important; }

/* Ajustes Específicos */
body.dark-mode .section-block { background-color: #262626 !important; border-color: #444 !important; }
body.dark-mode .import-box { background-color: #263238 !important; border-color: #37474f !important; }
body.dark-mode .import-box label { color: #90caf9 !important; }



/* --- TELA DE ASSINATURA --- */
.plan-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}
.plan-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: white;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.plan-status-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}
.plan-body { padding: 25px; }
.plan-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.plan-info-item label { display: block; font-size: 11px; color: #777; text-transform: uppercase; margin-bottom: 5px; }
.plan-info-item div { font-size: 16px; font-weight: bold; color: #333; }

/* Histórico de Pagamentos */
.history-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.history-table th { text-align: left; padding: 12px; background: #f5f5f5; color: #555; font-size: 12px; border-bottom: 2px solid #ddd; }
.history-table td { padding: 12px; border-bottom: 1px solid #eee; color: #333; font-size: 13px; }
.badge-pay { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; text-transform: uppercase; }
.badge-pay.paid { background: #c8e6c9; color: #2e7d32; }
.badge-pay.pending { background: #fff3e0; color: #e65100; }
.badge-pay.failed { background: #ffcdd2; color: #c62828; }


/* --- ESTILOS DOS CARDS DE PLANOS (NOVO) --- */
.plans-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.plan-option-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    width: 260px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plan-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #ffb300;
}

/* Destaque para o plano recomendado */
.plan-featured {
    border: 2px solid #2e7d32;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.2);
}

.plan-badge {
    background: #2e7d32;
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px;
    position: absolute;
    top: 0;
    width: 100%;
}

.plan-header-box {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.plan-title {
    font-size: 18px;
    font-weight: 900;
    color: #37474f;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.plan-price {
    font-size: 28px;
    font-weight: bold;
    color: #1b5e20;
}

.plan-price span {
    font-size: 14px;
    color: #777;
    font-weight: normal;
}

.plan-features {
    padding: 20px;
    flex: 1;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.plan-features li {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features i {
    color: #2e7d32;
}

.plan-btn-box {
    padding: 20px;
}

.btn-choose-plan {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    font-size: 12px;
}

/* Cores dos Botões */
.btn-bronze { background: #8d6e63; color: white; }
.btn-prata { background: #78909c; color: white; }
.btn-ouro { background: #ffb300; color: #333; }
.btn-black { background: #212121; color: #ffb300; }

.btn-choose-plan:hover { opacity: 0.9; transform: scale(1.02); }


/* --- ESTILO DAS CHAVINHAS (SWITCH) --- */
.switch-container { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #2e7d32; }
input:checked + .slider:before { transform: translateX(20px); }

/* Botão de Extras na Tabela */
.btn-extra { background:none; border:1px solid #78909c; color:#546e7a; font-size:10px; padding:2px 6px; border-radius:4px; cursor:pointer; margin-top:2px; }
.btn-extra:hover { background:#eceff1; }



/* ETIQUETA DE CATEGORIA (BADGE) */
.cat-badge {
    background-color: #e3f2fd; /* Azul bem clarinho */
    color: #1565c0; /* Azul escuro */
    border: 1px solid #90caf9;
    padding: 2px 8px;
    border-radius: 12px; /* Bordas redondas */
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 4px;
    letter-spacing: 0.5px;
}


/* --- CIRURGIA V3: TABELA FINANCEIRO EQUILIBRADA (Visual Limpo e Botões Maiores) --- */

/* 1. Espaçamento um pouco mais confortável para acompanhar os botões maiores */
#tab-fin td {
    padding: 8px 5px !important; /* Aumentei um pouquinho o respiro */
    font-size: 12px !important;  /* Subi a fonte de 11px para 12px (mais legível) */
    vertical-align: middle !important;
    line-height: 1.3 !important;
}

/* 2. Descrição com limite para não alargar a tela infinitamente */
#tab-fin td:nth-child(2) {
    max-width: 260px; /* Um pouco mais largo para caber nomes maiores */
    white-space: normal !important; /* Permite quebrar linha se for longo */
}

/* 3. Etiquetas (Bancos/Categorias) mais legíveis */
.cat-badge, .tag-banco {
    font-size: 10px !important; /* Aumentei de 9px para 10px */
    padding: 3px 8px !important;
    margin-top: 3px !important;
    display: inline-block !important;
    line-height: 1 !important;
    letter-spacing: 0.5px;
    border-radius: 4px !important;
}

/* 4. AQUI A MUDANÇA: Botões de Ação Maiores e Mais Bonitos */
#tab-fin .action-btn {
    width: 28px !important;  /* Aumentei de 24px para 28px (Fica top no dedo) */
    height: 28px !important; /* Quadrado perfeito */
    font-size: 12px !important; /* Ícone interno aumentou de 10px para 12px */
    margin-right: 3px !important;
    border-radius: 5px !important; /* Bordas mais arredondadas */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}





.logo-sidebar {
    max-width: 140px;   /* Aumentei de 80px para 140px (Quase o dobro) */
    max-height: 140px;  /* Aumentei a altura também */
    width: 100%;        /* Garante que ela use o espaço disponível se precisar */
    height: auto;       /* Mantém a proporção correta */
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)); /* Sombra mais forte para destacar */
    transition: transform 0.3s ease; /* Efeito suave se passar o mouse */
	
}

/* Efeito Bônus: Cresce um pouquinho ao passar o mouse */
.logo-sidebar:hover {
    transform: scale(1.05); 
}

/* No celular, mantemos um tamanho seguro para não ocupar a tela toda */
@media (max-width: 768px) {
    .logo-sidebar {
        max-width: 90px; /* Um pouco maior que antes, mas seguro */
    }
}

/* SWITCH DE PERMISSÃO */
.perm-switch-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.perm-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 220px; /* Tamanho fixo para ficar alinhado */
    font-size: 12px;
    font-weight: 500;
    color: #444;
}
/* O Switch em si */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}
.switch input { display:none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #4CAF50; }
input:checked + .slider:before { transform: translateX(14px); }

/* Cores específicas para os módulos */
.perm-label i { margin-right: 6px; width: 15px; text-align: center; }


/* ETIQUETAS DE TIPO DE CONTA (ADMIN) */
.badge-tipo {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.badge-dono {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.badge-func {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}


/* --- ESTILO DEFINITIVO V4 (NOMES COMPLETOS + SCROLL + MÊS ATUAL) --- */

/* Container Principal: Garante que os botões fiquem na esquerda e o Ano na direita */
.fin-header-controls {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    overflow: hidden !important; /* Impede a tela de quebrar */
}

/* Área dos Botões (Esquerda): Permite rolar se não couber */
.fin-left-scroll {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    overflow-x: auto !important; /* Rola para o lado se precisar */
    white-space: nowrap !important;
    padding-bottom: 5px !important;
    flex: 1 !important; /* Ocupa todo o espaço disponível */
    
    /* Barra de rolagem fina e discreta */
    scrollbar-width: thin; 
    scrollbar-color: #ccc transparent;
}

/* Esconde barra de rolagem no Chrome/Safari para ficar limpo */
.fin-left-scroll::-webkit-scrollbar { height: 4px; }
.fin-left-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Botões Compactos (Mas com texto completo) */
.btn-compact {
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 11px !important; /* Tamanho legível */
    font-weight: 700 !important;
    border-radius: 4px !important;
    border: none !important;
    color: white !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important; /* NUNCA quebra linha */
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0 !important; /* Impede o botão de ser esmagado */
    text-transform: none !important; /* Remove CAIXA ALTA para caber o texto longo */
}

.btn-compact:hover { opacity: 0.9; transform: translateY(-1px); }

/* Selects Ajustados */
.select-compact {
    height: 30px !important;
    font-size: 11px !important;
    padding: 0 5px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    color: #333 !important;
    background: white !important;
    font-weight: 600 !important;
    width: auto !important;
    flex-shrink: 0 !important; /* Não deixa sumir */
}

/* Botão Funil */
.btn-filter-clear {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* --- SELETOR DE ANO (CORRIGIDO: SEM FUNDO) --- */
.fin-year-selector {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    background: transparent !important; /* TIRA O FUNDO BRANCO */
    padding: 0 !important;
    border: none !important;
}


/* Efeito para quando o filtro anual estiver ativo */
#btn-view-full-year.active-filter {
    background: #d32f2f !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    font-weight: bold;
}


/* Melhora a performance de rolagem em tabelas grandes */
#tab-fin tr {
    content-visibility: auto;
    contain-intrinsic-size: 1px 40px; /* Ajuda o navegador a reservar o espaço antes de desenhar */
}


/*ESTILOS MODAIS*/

@keyframes zoomIn { from {transform: scale(0.5); opacity: 0;} to {transform: scale(1); opacity: 1;} }

    /* CSS ANIMATION FOR MODAL (ADICIONADO) */
    @keyframes popIn {
        from { opacity: 0; transform: scale(0.8); }
        to { opacity: 1; transform: scale(1); }
    }

    /* O RESTO DO CSS É O SEU ORIGINAL */
    #btn-calc-float {
        position: fixed; bottom: 30px; left: 290px; width: 60px; height: 60px;
        background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
        color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center;
        font-size: 24px; box-shadow: 0 4px 15px rgba(21, 101, 192, 0.4);
        cursor: pointer; z-index: 9999; transition: transform 0.2s; border: 2px solid rgba(255,255,255,0.2);
    }
    #btn-calc-float:hover { transform: scale(1.1) rotate(15deg); }

    #panel-calc {
        position: fixed; top: 150px; left: 320px;
        width: 360px; min-width: 300px; min-height: 500px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
        z-index: 10000; display: none; border: 1px solid #1565c0;
        flex-direction: column; overflow: hidden; resize: both;
    }

    .calc-header { background: #37474f; color: white; padding: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 13px; cursor: move; }
    .calc-header button { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }

    .calc-tabs { display: flex; background: #eceff1; overflow-x: auto; border-bottom: 1px solid #ddd; }
    .calc-tab { flex: 1; padding: 8px 5px; border: none; background: none; font-size: 10px; font-weight: bold; color: #607d8b; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-width: 60px; }
    .calc-tab.active { color: #1565c0; border-bottom: 3px solid #1565c0; background: white; }

    .calc-content { padding: 15px; display: none; flex: 1; overflow-y: auto; }
    .calc-content.active { display: block; animation: fadeIn 0.2s; }

    /* ESTILO WIZARD (MINI ORÇAMENTO) */
    .mini-tabs { display: flex; gap: 2px; background: #eee; margin-bottom: 10px; padding: 5px; border-bottom: 1px solid #ccc; overflow-x: auto; }
    .mini-tabs button { flex: 1; border: 1px solid #ccc; background: #fff; padding: 5px; font-size: 10px; cursor: pointer; border-radius: 4px 4px 0 0; min-width: 60px; }
    .mini-tabs button.active { background: #1565c0; color: white; border-color: #0d47a1; font-weight: bold; }

    .mini-content-area { padding: 10px; height: calc(100% - 60px); overflow-y: auto; }
    .mini-step { display: none; } .mini-step.active { display: block; animation: fadeIn 0.2s; }

    .mini-banner { background: #e8f5e9; color: #2e7d32; padding: 5px; font-size: 11px; font-weight: bold; text-align: right; border: 1px solid #c8e6c9; border-radius: 4px; margin-bottom: 5px; }
    .mini-banner.red { background: #ffebee; color: #c62828; border-color: #ffcdd2; }

    /* CABEÇALHOS DAS TABELAS - ALINHAMENTO FIXO */
    .mini-table-header { display: flex; gap: 5px; background: #e0e0e0; padding: 5px; border-radius: 4px; margin-bottom: 5px; }
    .mini-table-header span { font-size: 9px; font-weight: bold; color: #555; text-align: center; text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .mini-table-header span:first-child { text-align: left; padding-left: 2px; }

    .mini-list { margin-bottom: 10px; font-size: 11px; }
    .mini-item-row { display: flex; gap: 5px; margin-bottom: 5px; align-items: center; }
    
    /* INPUTS COMPACTOS */
    .mini-item-row input { 
        padding: 4px 2px; 
        font-size: 11px; 
        border: 1px solid #ccc; 
        border-radius: 3px; 
        text-align: center; 
        height: 28px; /* Altura fixa para não estourar */
    }
    .mini-item-row input:first-child { text-align: left; padding-left: 5px; }
    
    .btn-mini-add { width: 100%; padding: 5px; border: 1px dashed #1565c0; color: #1565c0; background: #e3f2fd; cursor: pointer; font-size: 11px; font-weight: bold; border-radius: 4px; }
    .btn-mini-add.red { border-color: #c62828; color: #c62828; background: #ffebee; }
    
    .btn-mini-action { padding: 5px 10px; border: none; border-radius: 4px; color: white; font-weight: bold; cursor: pointer; font-size: 11px; flex: 1; }
    .orange { background: #ef6c00; } .blue { background: #1565c0; } .green { background: #2e7d32; }

    .mini-grid-params { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
    .mini-grid-params label { font-size: 9px; color: #555; display: block; }
    .mini-grid-params input { width: 100%; padding: 4px; font-size: 11px; border: 1px solid #ccc; box-sizing: border-box; }

    .mini-resumo-card { background: #fff; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 12px; }
    .mini-resumo-card .row { display: flex; justify-content: space-between; margin-bottom: 5px; }
    .mini-resumo-card .total { border-top: 1px solid #ccc; padding-top: 5px; font-weight: bold; margin-top: 5px; }
    .mini-resumo-card .destaque { background: #e8f5e9; padding: 5px; border-radius: 4px; margin-top: 5px; font-weight: bold; }

    .btn-calc-action { width: 100%; padding: 10px; background: #1565c0; color: white; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 12px; }
    .btn-calc-clear-red { padding: 10px; background: #ef5350; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; width: 100%; }
    .calc-result { margin-top: 15px; padding: 10px; background: #f3e5f5; border: 1px dashed #ab47bc; border-radius: 6px; text-align: center; }
    .area-card { display: flex; justify-content: space-between; padding: 8px; margin-bottom: 5px; border-radius: 6px; color: white; font-size: 12px; }
    .area-m2 { background: #607d8b; } .area-ha { background: #2e7d32; } .area-mg { background: #1565c0; } 
    .area-sp { background: #c62828; } .area-go { background: #ef6c00; } .area-ba { background: #7b1fa2; }
    
    #panel-calc input:not(.mini-item-row input):not(.mini-grid-params input) { width: 100%; padding: 8px; margin-bottom: 5px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
    #calc-display { text-align: right; font-size: 20px; font-family: monospace; letter-spacing: 2px; background: #eee; margin-bottom: 10px; }
    .calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
    .calc-grid button { padding: 12px; font-size: 16px; border: none; background: #f5f5f5; cursor: pointer; border-radius: 4px; font-weight: bold; }
    .calc-grid .op { background: #e3f2fd; color: #1565c0; } .calc-grid .eq { background: #1565c0; color: white; grid-row: span 2; }
    #calc-resize-handle { width: 15px; height: 15px; background: linear-gradient(135deg, transparent 50%, #1565c0 50%); position: absolute; right: 0; bottom: 0; cursor: nwse-resize; z-index: 10001; }

    @media (max-width: 768px) {
        #btn-calc-float { left: 20px; bottom: 90px; }
        #panel-calc { top: 100px; left: 20px; width: calc(100% - 40px); height: auto !important; }
        #calc-resize-handle { display: none; }
    }
	
	.event-tag {
    font-size: 10px !important;
    padding: 3px 6px !important;
    border-radius: 4px;
    color: white !important; /* Texto branco para não forçar a vista */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 2px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2); /* Sombra leve para destacar o branco */
    border: none !important;
}

/* Cores mais suaves para os fundos */
.tag-receita { background-color: #43a047 !important; } /* Verde mais vivo */
.tag-despesa { background-color: #e53935 !important; } /* Vermelho equilibrado */
.tag-rdo { background-color: #fb8c00 !important; }     /* Laranja obra */
.tag-lembrete { background-color: #1e88e5 !important; } /* Azul lembrete */

/* Garante o ponteiro de mãozinha e o hover esverdeado */
.calendar-day {
    cursor: pointer !important;
}

.calendar-day:hover {
    background-color: #f1f8e9 !important; /* Efeito esverdeado igual ao dashboard */
    transition: background 0.2s ease;
}

/* Garante que o botão de lembrete também tenha mãozinha */
.calendar-day button {
    cursor: pointer !important;
}


/* Estilo exclusivo para o modal quando for aberto pela Agenda */
.modal-agenda .modal-box {
    width: 95%;
    max-width: 850px; /* <--- AUMENTE AQUI (estava 600px). 850px deixará ele bem mais largo */
    min-width: 320px;
    text-align: left;
}

/* Ajuste para garantir que o conteúdo interno use o espaço total */
.modal-agenda #modal-msg {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Cor vermelha para lembretes urgentes no calendário */
.tag-urgente-calendario {
    background-color: #d32f2f !important;
    color: white !important;
    font-weight: bold;
    animation: pulse-red 2s infinite; /* Opcional: efeito de pulsar */
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
    70% { box-shadow: 0 0 0 5px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}



/* ========================================= */
/* 1. ESTRUTURA GERAL DO LAYOUT DO MAPA      */
/* ========================================= */

.map-layout {
    display: flex;
    height: 100%; 
    overflow: hidden;
    position: relative;
    border-top: 1px solid #ddd;
}

.map-sidebar {
    width: 300px; 
    background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.map-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
}

.map-view {
    flex: 1; 
    position: relative;
    z-index: 1;
    background: #e0e0e0;
}

/* Responsivo para Celular */
@media (max-width: 768px) {
    .map-layout { flex-direction: column-reverse; }
    .map-sidebar { width: 100%; height: 35%; }
    .map-view { height: 65%; }
}

/* ========================================= */
/* 2. COMPONENTES: ABAS E FERRAMENTAS        */
/* ========================================= */

/* Cabeçalho das Abas */
.map-tabs-header {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.map-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.map-tab-btn:hover { background: #e0e0e0; }
.map-tab-btn.active {
    background: white;
    color: #1b5e20;
    border-bottom: 3px solid #1b5e20;
}

/* Botões de Ferramentas */
.btn-tool-map {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #37474f;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-tool-map:hover {
    background: #f9f9f9;
    border-color: #bbb;
    transform: translateX(2px);
}

/* ========================================= */
/* 3. POPUPS E MARCADORES (LEAFLET)          */
/* ========================================= */

/* Correção do Popup Leaflet */
.leaflet-popup-content-wrapper {
    padding: 0 !important; 
    border-radius: 8px !important;
    overflow: hidden !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 250px !important;
    line-height: 1.4 !important;
}

/* Cabeçalho Popup (Geral/Cliente) */
.popup-header {
    background-color: #1b5e20 !important;
    color: white !important;
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

.popup-body {
    padding: 15px;
    background-color: white;
    text-align: center;
}

/* Cabeçalho Popup (Projetos/Desenhos) */
.popup-projeto-header {
    background-color: #ffb300 !important;
    color: #333 !important;
    padding: 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.popup-projeto-body {
    padding: 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
}

/* Ícones de Edição do Desenho (Quadradinhos) */
.leaflet-div-icon, .leaflet-editing-icon {
    background: #fff !important;
    border: 2px solid #1565c0 !important;
    border-radius: 2px !important;
    width: 8px !important;
    height: 8px !important;
    margin-left: -4px !important;
    margin-top: -4px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ========================================= */
/* 4. LISTA LATERAL (CLIENTES E PROJETOS)    */
/* ========================================= */

/* Item da Lista de Clientes */
.map-client-item:hover {
    background: #e3f2fd !important;
    border-left-color: #1565c0 !important;
}

/* --- GRUPOS (Pastas Ponto/Área) --- */
.layer-group-header {
    background-color: #eee;
    border: 1px solid #ccc;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #37474f;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-radius: 4px 4px 0 0;
    cursor: pointer; /* Mãozinha */
    transition: background 0.2s;
    user-select: none;
}

.layer-group-header:hover { background-color: #e0e0e0; }

.layer-group-body {
    border: 1px solid #eee;
    border-top: none;
    padding: 5px;
    margin-bottom: 5px;
    background: #fdfdfd;
    border-radius: 0 0 4px 4px;
}

/* Lógica de Recolher/Expandir */
.layer-group-body.collapsed { display: none; }

.group-title-click {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.arrow-icon { transition: transform 0.2s; }
.arrow-icon.closed { transform: rotate(-90deg); }

/* Botões Mestre (Olho/Lixeira do Grupo) */
.btn-master-layer {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    opacity: 0.7;
    transition: 0.2s;
}
.btn-master-layer:hover { opacity: 1; transform: scale(1.1); }


/* --- ITENS INDIVIDUAIS (Com Quebra de Linha Correta) --- */
.map-project-item {
    background: white;
    margin-bottom: 2px !important;
    border-radius: 2px !important;
    border-left: 2px solid transparent !important;
    
    /* Configuração de Altura Automática */
    height: auto !important;
    min-height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center !important;
    padding: 8px 10px !important;
}

/* Bordas coloridas por tipo */
.border-ponto { border-left-color: #e53935 !important; }
.border-area { border-left-color: #ffb300 !important; }

/* Texto do Nome (Permite quebra de linha) */
.map-project-item > div:first-child {
    min-width: 0;
    padding-right: 5px;
    white-space: normal !important; /* Quebra linha */
    overflow: visible !important;
    line-height: 1.3;
}

.map-project-item strong, 
.map-project-item > div:first-child > div:first-child {
    white-space: normal !important;
    display: block !important;
}

/* =================================================================
   CORREÇÃO DEFINITIVA: BARRA DE ROLAGEM E TEXTO DO MAPA
   ================================================================= */

/* 1. Garante que a aba ocupe 100% da altura lateral */
.aba-conteudo {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Impede a aba inteira de rolar */
}

/* 2. O PULO DO GATO: Arruma a div interna que tem o padding */
/* Sem isso, a lista empurra a tela para baixo infinitamente */
#aba-mapa-projetos > div {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box; /* Faz o padding contar dentro da altura */
    overflow: hidden; /* Trava o crescimento */
}

/* 3. A Lista agora ganha vida própria e rola sozinha */
#lista-itens-projeto {
    flex: 1; /* Ocupa todo o espaço que sobrar */
    overflow-y: auto !important; /* Força a barra de rolagem */
    overflow-x: hidden;
    min-height: 0; /* Correção para Firefox/Flexbox */
    padding-bottom: 20px;
    margin-top: 5px;
    
    /* Estiliza a barra para ficar bonita e fina */
    scrollbar-width: thin; 
    scrollbar-color: #ccc transparent;
}

/* 4. Correção do Texto da Área (Para não quebrar linha) */
.info-area-texto {
    white-space: nowrap !important; /* PROIBIDO quebrar linha */
    overflow: hidden !important;
    text-overflow: ellipsis !important; /* Coloca "..." se não couber */
    display: block !important;
    width: 100%;
    max-width: 170px; /* Força o corte antes de bater nos botões */
    margin-top: 3px;
    font-size: 10px !important;
    color: #666 !important;
    line-height: 1.2 !important;
}

/* Garante que o container do texto obedeça o corte */
.map-project-item > div:first-child {
    min-width: 0; /* Permite que o flex item encolha */
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* ========================================= */
/* 5. MODAL / EXPORTAÇÃO                     */
/* ========================================= */

/* Modal mais largo */
#custom-modal-overlay > div {
    width: 500px !important;
    max-width: 95vw !important;
}

/* --- CORREÇÃO DEFINITIVA: TEXTO DO MODAL EXPORTAR --- */
.linha-exportacao-texto {
    /* O SEGREDO: flex: 1 obriga o texto a crescer e ocupar o espaço vazio */
    flex: 1 !important; 
    
    /* Configurações para cortar o texto com "..." se for muito longo */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important; /* Permite encolher sem quebrar o layout */
    
    /* Estilo do texto */
    font-size: 12px !important;
    color: #333 !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
    display: block !important; 
}


/* --- ETIQUETAS (LABELS) DO MAPA --- */
.lbl-transparente {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Segoe UI', sans-serif !important;
    white-space: nowrap !important;
    pointer-events: none; /* Permite clicar no mapa através do texto */
}
.lbl-transparente::before {
    display: none !important; /* Remove a setinha do balão */
}