:root {
    --primary: #1e3a8a;
    --primary-hover: #172554;
    --secondary: #0d9488;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --border: #e2e8f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background-color: var(--bg); color: var(--text); padding: 20px; }
header { background: var(--primary); color: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; text-align: center; }

.tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 10px; flex-wrap: wrap; }
.tab-btn { background: #e2e8f0; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; transition: 0.2s; }
.tab-btn.active { background: var(--primary); color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.card { background: var(--card-bg); padding: 20px; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
.form-group { display: flex; flex-direction: column; }
label { font-size: 12px; font-weight: 600; margin-bottom: 5px; color: #475569; }
input, select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; outline: none; background: white; }

.btn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); }
.btn-danger { background: #ef4444; }

.kpi-container { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.kpi-card { flex: 1; min-width: 220px; background: white; padding: 15px; border-radius: 8px; border-left: 5px solid var(--secondary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.kpi-title { font-size: 12px; color: #64748b; font-weight: 600; }
.kpi-value { font-size: 20px; font-weight: bold; margin-top: 5px; }

.ficha-resumo { background: #f1f5f9; padding: 15px; border-radius: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 15px; }
.ficha-item { background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid var(--border); font-size: 13px; }

table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 13px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; font-weight: 600; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #e2e8f0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 15px 0; }

/* CONFIGURAÇÃO DE IMPRESSÃO BLINDADA (Foca estritamente no Dossiê) */
@media print {
    header, 
    .tabs, 
    .no-print, 
    button, 
    #cadastro, 
    #lancamentos, 
    #relatorios, 
    #backup, 
    #usuarios,
    .tab-content:not(#dossie-tab) {
        display: none !important;
    }

    #dossie-tab {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
    }

    body { 
        background: white !important; 
        color: black !important; 
        padding: 0 !important; 
        margin: 0 !important; 
    }

    .card { 
        box-shadow: none !important; 
        border: none !important; 
        padding: 0 !important; 
        margin-bottom: 10px !important; 
    }
}


header img {
    max-height: 45px;
    width: auto;
}