          /* ========== BASE ========== */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { 
            font-family: 'Inter', 'Segoe UI', Arial, sans-serif; 
            background: linear-gradient(135deg, #e8edf2 0%, #dce3e9 100%);
            padding: 30px;
            min-height: 100vh;
            transition: background 0.3s, color 0.3s;
        }
        .container { 
            max-width: 1400px; 
            margin: auto; 
            background: #ffffff;
            border-radius: 32px; 
            padding: 35px; 
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
            position: relative;
            overflow: hidden;
            transition: background 0.3s, color 0.3s, box-shadow 0.3s;
        }
        .container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #d4af37, #1e3a5f, #d4af37);
            transition: background 0.3s;
        }
        /* ========== MODO OSCURO ========== */
        body.dark-mode {
            background: #121212;
            color: #e0e0e0;
        }
        body.dark-mode .container {
            background: #1e1e1e;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
        }
        body.dark-mode .container::before {
            background: linear-gradient(90deg, #d4af37, #0a2a4a, #d4af37);
        }
        body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
            color: #f0e6d0;
        }
        body.dark-mode h2 {
            background: linear-gradient(90deg, #1e2a3a, transparent);
            border-left-color: #d4af37;
        }
        body.dark-mode .header-title h2 {
            background: none;
        }
        body.dark-mode table {
            background: #2a2a2a;
        }
        body.dark-mode th {
            background: #0a2a4a;
            color: #f0e6d0;
        }
        body.dark-mode td {
            border-bottom: 1px solid #3a3a3a;
        }
        body.dark-mode tr:hover {
            background: #2a3a4a;
        }
        body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
            background: #2d2d2d;
            border-color: #444;
            color: #e0e0e0;
        }
        body.dark-mode input:focus, body.dark-mode select:focus, body.dark-mode textarea:focus {
            border-color: #d4af37;
            box-shadow: 0 0 0 3px rgba(212,175,55,0.2);
        }
        body.dark-mode .input-pesos {
            background: #2d2d2d;
            color: #facc15;
        }
        body.dark-mode .toolbar {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .analisis-container {
            background: #1e1e1e;
            border-color: #444;
        }
        body.dark-mode .dashboard-card, body.dark-mode .graph-card {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .dinamico-card {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .dinamico-card:hover {
            border-color: #d4af37;
        }
        body.dark-mode .tabla-credito td:first-child {
            background: #1e2a3a;
            color: #f0e6d0;
        }
        body.dark-mode .tabla-credito td {
            border-color: #444;
        }
        body.dark-mode .hallazgos-area, body.dark-mode .signature-block {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .total-gastos {
            background: linear-gradient(135deg, #0a2a4a, #1e3a5f);
        }
        body.dark-mode .cuadro-evaluativo {
            background: linear-gradient(135deg, #1a2a1a, #0a1a0a);
            border-color: #2a4a2a;
        }
        body.dark-mode .cuadro-evaluativo h3 {
            color: #8bc34a;
        }
        body.dark-mode .cuota-profesional {
            background: linear-gradient(135deg, #1a2a3a, #0a1a2a);
        }
        body.dark-mode .leyenda-item {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .leyenda-item:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        }
        body.dark-mode .validacion.ok {
            background: #1a3a1a;
            color: #8bc34a;
        }
        body.dark-mode .validacion.no {
            background: #3a1a1a;
            color: #ef5350;
        }
        body.dark-mode .validacion.parcial {
            background: #3a2a1a;
            color: #ffb74d;
        }
        body.dark-mode .btn {
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        body.dark-mode .btn-success { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
        body.dark-mode .btn-info { background: linear-gradient(135deg, #00838f, #006064); }
        body.dark-mode .btn-primary { background: linear-gradient(135deg, #0d47a1, #1a237e); }
        body.dark-mode .btn-warning { background: linear-gradient(135deg, #f57c00, #e65100); }
        body.dark-mode .btn-danger { background: linear-gradient(135deg, #c62828, #b71c1c); }
        body.dark-mode .btn-agregar {
            background: #2a2a2a;
            color: #66bb6a;
            border-color: #66bb6a;
        }
        body.dark-mode .btn-agregar:hover {
            background: #66bb6a;
            color: #1e1e1e;
        }
        body.dark-mode .btn-opt.btn-si { background: #1a3a1a; color: #8bc34a; }
        body.dark-mode .btn-opt.btn-no { background: #3a1a1a; color: #ef5350; }
        body.dark-mode .btn-opt.btn-na { background: #2a2a2a; color: #aaa; }
        body.dark-mode .btn-opt.active.btn-si { background: #2e7d32; color: white; }
        body.dark-mode .btn-opt.active.btn-no { background: #c62828; color: white; }
        body.dark-mode .btn-opt.active.btn-na { background: #555; color: white; }
        body.dark-mode .sin-datos {
            background: #1e1e1e;
            color: #aaa;
            border-color: #444;
        }
        body.dark-mode .nav-index {
            background: #1e1e1e;
            border-color: #444;
        }
        body.dark-mode .nav-index a {
            background: #2a2a2a;
            color: #ccc;
        }
        body.dark-mode .nav-index a:hover {
            background: #d4af37;
            color: #1e1e1e;
        }
        body.dark-mode #progress-container {
            background: #1e1e1e;
            border-color: #444;
        }
        body.dark-mode #progress-container .stats span {
            color: #ccc;
        }
        body.dark-mode footer {
            border-top-color: #444;
            color: #aaa;
        }
        body.dark-mode .alert {
            background: #2a2a2a;
            color: #e0e0e0;
        }
        body.dark-mode .alert-success {
            background: #1a3a1a;
            color: #8bc34a;
            border-left-color: #66bb6a;
        }
        body.dark-mode .alert-error {
            background: #3a1a1a;
            color: #ef5350;
            border-left-color: #ef5350;
        }
        body.dark-mode .instrucciones {
            background: linear-gradient(135deg, #1a2a3a, #2a1a1a);
            border-left-color: #d4af37;
            color: #ccc;
        }
        body.dark-mode .porcentaje {
            background: #1a2a3a;
            color: #90caf9;
        }
        body.dark-mode .sub-titulo {
            background: linear-gradient(90deg, #1e2a3a, transparent);
            color: #f0e6d0;
        }
        body.dark-mode .kpi-card {
            background: linear-gradient(135deg, #0a2a4a, #1a3a5f);
        }
        body.dark-mode .tarjeta-indicador {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .tarjeta-indicador .detalle {
            border-top-color: #444;
        }
        body.dark-mode .barra-fondo {
            background: #3a3a3a;
        }
        body.dark-mode .barra-progreso {
            color: #1e1e1e;
        }
        body.dark-mode .btn-eliminar {
            background: #c62828;
        }
        body.dark-mode .btn-eliminar:hover {
            background: #b71c1c;
        }
        body.dark-mode .logo-item div[style*="background"] {
            background: #0a2a4a !important;
            color: #f0e6d0 !important;
        }
        body.dark-mode .desembolsos-tabla th {
            background: linear-gradient(135deg, #b8941e, #d4af37);
            color: #1e1e1e;
        }
        body.dark-mode .terceros-table th {
            background: #1a2a3a;
            color: #f0e6d0;
        }
        body.dark-mode .tabla-resumen th {
            background: linear-gradient(135deg, #0a2a4a, #1a3a5f);
        }
        body.dark-mode #resultado {
            background: linear-gradient(135deg, #1a2a3a, #2a1a1a);
            color: #ccc;
        }
        body.dark-mode .print-text {
            color: #e0e0e0 !important;
        }

        /* ========== RESTO DE ESTILOS (igual que antes) ========== */
        /* ... (todo el CSS anterior se mantiene, solo añadimos el modo oscuro y el botón flotante) ... */
        /* ===== SECCIONES CON ESTILO EJECUTIVO ===== */
        h2[id^="seccion-"] {
            display: flex !important;
            align-items: center;
            gap: 14px;
            background: linear-gradient(90deg, #f8fafc 0%, transparent 80%);
            border: none;
            border-left: 5px solid #d4af37;
            border-radius: 0 14px 14px 0;
            padding: 16px 24px 16px 18px;
            margin: 34px 0 22px 0;
            font-weight: 700;
            letter-spacing: 0;
            scroll-margin-top: 20px;
            transition: all 0.2s ease;
        }
        
        /* Círculo dorado con el número */
                    h2[id^="seccion-"]::before {
                content: attr(data-num) !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                width: 26px !important;
                height: 26px !important;
                background: #1e3a5f !important;
                color: white !important;
                font-size: 0.72rem !important;
                font-weight: 800 !important;
                border-radius: 50% !important;
                flex-shrink: 0 !important;
                box-shadow: none !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            h2[data-num*="."]::before {
                width: 26px !important;
                height: 26px !important;
                font-size: 0.62rem !important;
                background: #4b5563 !important;
            }
        
               /* Sub-secciones (3.1, 3.2, etc.) — círculo más pequeño pero redondo */
        h2[data-num*="."]::before {
            width: 46px;
            height: 46px;
            padding: 0;
            font-size: 0.82rem;
            font-weight: 800;
            background: linear-gradient(135deg, #1e3a5f 0%, #2c4a6e 100%);
            box-shadow: 0 4px 12px -3px rgba(30,58,95,0.4);
            letter-spacing: -0.5px;
        }
        
        /* Ícono dentro de un chip suave */
        h2[id^="seccion-"] > i {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            background: #eff6ff;
            color: #1e3a5f;
            border-radius: 9px;
            font-size: 0.9rem;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        h2[id^="seccion-"]:hover > i {
            background: #dbeafe;
        }
        
        /* Texto del título */
        h2[id^="seccion-"] .h2-texto {
            color: #1e3a5f;
            font-size: 1.35rem;
            font-weight: 700;
            letter-spacing: 0.8px;
            line-height: 1.2;
            text-transform: uppercase;
            font-family: 'Inter', sans-serif;
        }
        
        /* Sub-secciones: texto un poco más pequeño */
        h2[data-num*="."] .h2-texto {
            font-size: 1.08rem;
            letter-spacing: 0.5px;
        }
        
        /* ===== SUB-TÍTULOS INTERNOS MÁS REFINADOS ===== */
        .sub-titulo {
            display: flex !important;
            align-items: center;
            gap: 10px;
            background: linear-gradient(90deg, #eff6ff 0%, transparent 90%) !important;
            color: #1e3a5f !important;
            padding: 11px 20px !important;
            border-radius: 0 12px 12px 0 !important;
            border-left: 4px solid #d4af37 !important;
            font-size: 0.8rem !important;
            font-weight: 700 !important;
            letter-spacing: 1.8px !important;
            text-transform: uppercase !important;
            margin: 26px 0 16px 0 !important;
        }
        .sub-titulo > i {
            color: #b8941e;
            font-size: 0.95rem;
        }
        
        /* ===== MODO OSCURO ===== */
        body.dark-mode h2[id^="seccion-"] {
            background: linear-gradient(90deg, #1e2a3a 0%, transparent 80%);
        }
        body.dark-mode h2[id^="seccion-"] > i {
            background: #1e2a3a;
            color: #f0e6d0;
        }
        body.dark-mode h2[id^="seccion-"]:hover > i {
            background: #2a3a4a;
        }
        body.dark-mode h2[id^="seccion-"] .h2-texto {
            color: #f0e6d0;
        }
        body.dark-mode .sub-titulo {
            background: linear-gradient(90deg, #1e2a3a 0%, transparent 90%) !important;
            color: #f0e6d0 !important;
        }
        body.dark-mode .sub-titulo > i {
            color: #d4af37;
        }
        h1, h2 { 
            color: #1e3a5f; 
            border-bottom: 3px solid #d4af37; 
            padding-bottom: 12px; 
            margin: 30px 0 20px 0;
            font-weight: 600;
            letter-spacing: -0.3px;
        }
        h2 { 
            border-left: 8px solid #d4af37; 
            padding-left: 20px;
            font-size: 1.6rem;
            background: linear-gradient(90deg, #f8f9fc, transparent);
            border-radius: 0 12px 12px 0;
            scroll-margin-top: 20px;
        }
        h1 { font-size: 1.8rem; text-align: center; border-bottom: 3px solid #d4af37; display: inline-block; width: auto; margin: 0 auto 20px; padding: 0 30px 12px; }
        .header-title { text-align: center; margin-bottom: 25px; }
        table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        th, td { border: none; padding: 12px; vertical-align: top; }
        th { background: linear-gradient(135deg, #1e3a5f, #2c4a6e); color: white; text-align: center; font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
        tr { border-bottom: 1px solid #e5e7eb; }
        tr:hover { background: #f8fafc; }
        input, select, textarea { 
            width: 100%; 
            padding: 10px 14px; 
            border-radius: 12px; 
            border: 1.5px solid #e2e8f0; 
            font-size: 14px; 
            font-family: 'Inter', Arial, sans-serif;
            transition: all 0.2s ease;
            background: #ffffff;
        }
        input:focus, select:focus, textarea:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }
        input[type="text"].input-pesos { text-align: right; font-weight: 600; color: #1e3a5f; background: #fefce8; }
        .validacion { font-weight: bold; text-align: center; padding: 8px; border-radius: 40px; font-size: 12px; }
        .ok { color: #155724; background: #d1fae5; }
        .no { color: #721c24; background: #fee2e2; }
        .parcial { color: #856404; background: #fef3c7; }
        .btn { 
            padding: 12px 28px; 
            border: none; 
            border-radius: 40px; 
            cursor: pointer; 
            font-size: 14px; 
            margin: 6px; 
            font-weight: 600; 
            color: white; 
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.15); }
        .btn-success { background: linear-gradient(135deg, #10b981, #059669); }
        .btn-info { background: linear-gradient(135deg, #06b6d4, #0891b2); }
        .btn-primary { background: linear-gradient(135deg, #1e3a5f, #2c4a6e); }
        .btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
        .btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
        .btn-warning:hover { background: linear-gradient(135deg, #d97706, #b45309); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4); }
        .toolbar { background: #f1f5f9; padding: 18px; border-radius: 20px; margin-bottom: 25px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; border: 1px solid #e2e8f0; }
        .analisis-container { background: linear-gradient(135deg, #f8fafc, #f1f5f9); border: 1px solid #e2e8f0; border-radius: 28px; padding: 30px; margin: 30px 0; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); }
        .dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; margin-bottom: 35px; max-width: 100%; }
        .dashboard-card { background: white; border-radius: 24px; padding: 25px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08); border: 1px solid #e2e8f0; transition: transform 0.2s; max-width: 400px; margin: 0 auto; }
        .dashboard-card:hover { transform: translateY(-3px); }
        .dashboard-card h3 { color: #1e3a5f; margin-bottom: 20px; font-size: 1.2rem; border-left: 5px solid #d4af37; padding-left: 15px; font-weight: 600; }
        .dashboard-card canvas { max-height: 200px !important; }
        .dashboard-card #gaugeLabel { font-size: 1.4rem !important; }
        .graph-card { background: white; border-radius: 24px; padding: 25px; border: 1px solid #e2e8f0; margin-bottom: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
        .graph-card canvas { max-height: 350px; width: 100% !important; }
        .leyenda-container { margin-top: 25px; }
        .leyenda-titulo { font-size: 1.1rem; font-weight: 700; color: #1e3a5f; margin-bottom: 20px; border-bottom: 2px solid #d4af37; padding-bottom: 10px; display: inline-block; }
        .leyenda-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
               .leyenda-item { 
            display: flex; 
            align-items: center; 
            gap: 14px; 
            padding: 14px 16px; 
            background: white; 
            border-radius: 14px; 
            border: 1px solid #e2e8f0; 
            border-left: 4px solid #1e3a5f;
            transition: all 0.2s; 
        }
        .leyenda-item:hover { 
            box-shadow: 0 6px 16px -8px rgba(30,58,95,0.15); 
            transform: translateX(2px); 
        }
        .leyenda-color { 
            width: 16px; 
            height: 16px; 
            border-radius: 4px; 
            flex-shrink: 0; 
        }
        .leyenda-info { flex: 1; }
        .leyenda-info .nombre { font-weight: 700; font-size: 0.9rem; color: #1e293b; }
        .leyenda-info .detalle { font-size: 0.75rem; color: #64748b; margin-top: 3px; }
        .leyenda-porcentaje { font-size: 1.6rem; font-weight: 800; }
        .leyenda-calificacion { font-size: 0.7rem; font-weight: 700; padding: 4px 12px; border-radius: 30px; text-transform: uppercase; letter-spacing: 0.5px; }
        .tabla-resumen { width: 100%; margin-top: 20px; border-radius: 20px; overflow: hidden; }
        .tabla-resumen th { background: linear-gradient(135deg, #1e3a5f, #2c4a6e); padding: 14px; font-size: 0.8rem; }
        .tabla-resumen td { padding: 12px; text-align: center; background: white; }
        .tabla-resumen .barra-fondo { height: 20px; min-width: 100px; }
        .barra-fondo { height: 28px; background: #e2e8f0; border-radius: 40px; overflow: hidden; position: relative; }
        .barra-progreso { height: 100%; border-radius: 40px; transition: width 0.6s ease; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.75rem; }
        .hallazgos-area, .signature-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 24px; padding: 25px; margin-bottom: 25px; transition: all 0.2s; }
        .hallazgos-area:hover, .signature-block:hover { border-color: #d4af37; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
        .signature-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 20px; }
                    /* Segundo auditor: si tiene display:none, no aparece en PDF */
            #bloqueSegundoAuditor[style*="display: none"] {
                display: none !important;
            }
            #bloqueSegundoAuditor[style*="display: block"] {
                display: block !important;
            }
.signature-block { flex: 1; min-width: 250px; }
        .observacion-field { margin-top: 20px; }
        .observacion-field label { font-weight: 600; display: block; margin-bottom: 8px; color: #1e3a5f; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .porcentaje { font-weight: 600; color: #1565c0; background: #e0f2fe; padding: 5px 12px; border-radius: 30px; text-align: center; font-size: 0.7rem; display: inline-block; }
        .btn-group { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
        .btn-opt { border: none; border-radius: 30px; padding: 6px 16px; cursor: pointer; font-weight: 600; font-size: 0.75rem; transition: all 0.2s; white-space: nowrap; }
        .btn-si { background: #d1fae5; color: #065f46; }
        .btn-no { background: #fee2e2; color: #991b1b; }
        .btn-na { background: #f1f5f9; color: #475569; }
        .btn-opt.active { transform: scale(1.05); box-shadow: 0 0 0 2px #d4af37, 0 0 0 4px #fef3c7; }
        .btn-si.active { background: #10b981; color: white; }
        .btn-no.active { background: #ef4444; color: white; }
        .btn-na.active { background: #64748b; color: white; }
        .alert { padding: 14px 24px; border-radius: 16px; position: fixed; top: 20px; right: 20px; z-index: 1000; font-weight: 600; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); animation: slideIn 0.3s ease; }
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        .alert-success { background: #d1fae5; color: #065f46; border-left: 5px solid #10b981; }
        .alert-error { background: #fee2e2; color: #991b1b; border-left: 5px solid #ef4444; }
        .print-text { display: none; white-space: normal; }
        .instrucciones { background: linear-gradient(135deg, #e0f2fe, #fef3c7); padding: 14px 20px; border-radius: 20px; margin-bottom: 20px; font-size: 0.85rem; border-left: 5px solid #d4af37; font-weight: 500; }
        .sub-titulo { background: linear-gradient(90deg, #e2e8f0, transparent); padding: 10px 20px; border-radius: 30px; margin: 20px 0 15px; font-weight: 700; color: #1e3a5f; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .btn-eliminar { background: #ef4444; color: white; border: none; padding: 6px 16px; border-radius: 30px; cursor: pointer; font-size: 0.75rem; font-weight: 600; transition: all 0.2s; }
        .btn-eliminar:hover { background: #dc2626; transform: scale(1.02); }
        .btn-agregar { padding: 12px 28px; border-radius: 40px; border: 2px dashed #10b981; background: white; color: #10b981; cursor: pointer; font-weight: 700; font-size: 0.9rem; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }
        .btn-agregar:hover { background: #10b981; color: white; border-style: solid; }
        .btn-agregar-fila { background: #10b981; color: white; border: none; padding: 6px 16px; border-radius: 30px; cursor: pointer; font-size: 0.7rem; font-weight: 600; margin: 8px 0; transition: all 0.2s; }
        .dinamico-container { margin-bottom: 35px; }
        .dinamico-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 24px; padding: 25px; margin-bottom: 25px; transition: all 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
        .dinamico-card:hover { box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); border-color: #d4af37; }
        .dinamico-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 12px; }
        .dinamico-header-left { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
        .dinamico-select { padding: 10px 20px; border-radius: 40px; border: 2px solid #d4af37; font-weight: 600; font-size: 0.9rem; background: white; color: #1e3a5f; cursor: pointer; min-width: 250px; transition: all 0.2s; }
        .sin-datos { text-align: center; padding: 60px; color: #64748b; font-style: italic; background: #f8fafc; border-radius: 24px; border: 2px dashed #cbd5e1; }
        .print-nombre-dinamico { display: none; }
        .terceros-table, .desembolsos-tabla { width: 100%; border-radius: 16px; overflow: hidden; }
        .terceros-table th { background: #475569; font-size: 0.75rem; }
        .desembolsos-tabla th { background: linear-gradient(135deg, #d4af37, #b8941e); color: #1e3a5f; font-weight: 700; }
        .tabla-credito { width: 100%; border-collapse: collapse; background: white; border-radius: 20px; overflow: hidden; }
        .tabla-credito td { padding: 14px; border: 1px solid #e2e8f0; vertical-align: top; }
        .tabla-credito td:first-child { background: #f1f5f9; width: 28%; font-weight: 700; color: #1e3a5f; }
        .gasto-item { display: flex; gap: 15px; margin-bottom: 12px; align-items: center; width: 100%; flex-wrap: wrap; }
        .gasto-item select { width: 260px; flex-shrink: 0; }
        .gasto-item input { flex: 1; min-width: 220px; }
        .total-gastos { margin-top: 18px; padding: 14px 20px; background: linear-gradient(135deg, #1e3a5f, #2c4a6e); color: white; border-radius: 40px; text-align: right; font-weight: 700; font-size: 0.9rem; }
        .cuota-profesional { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-radius: 20px; padding: 20px; margin: 15px 0; }
        .cuadro-evaluativo { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid #bbf7d0; border-radius: 28px; padding: 25px; margin-top: 30px; }
        .cuadro-evaluativo h3 { color: #166534; margin-bottom: 20px; text-align: center; font-weight: 700; }
        .kpi-card { background: linear-gradient(135deg, #1e3a5f, #2c4a6e); border-radius: 28px; padding: 28px; text-align: center; color: white; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); }
        .kpi-card .kpi-valor { font-size: 3.5rem; font-weight: 800; margin: 10px 0; }
        .logo-container { display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 20px; }
        .logo-item { display: flex; flex-direction: column; align-items: center; }
        .logo-item img { width: 80px; height: auto; max-height: 80px; object-fit: contain; }
        footer { margin-top: 40px; text-align: center; padding-top: 20px; border-top: 1px solid #e2e8f0; color: #64748b; font-size: 0.8rem; }
        .seccion-vacia-pdf { display: none !important; }
        #checklist-body tr.pendiente { background: #fef3c7 !important; border-left: 4px solid #f59e0b; transition: all 0.3s ease; }
        #checklist-body tr.pendiente td { background: #fef3c7 !important; }
        #checklist-body tr { transition: all 0.3s ease; }
        .checklist-respuesta { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
        .checklist-respuesta .btn-group { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
        .checklist-respuesta .btn-opt { padding: 4px 12px; font-size: 0.7rem; }
                /* ===== PANEL DE INDICADORES (estilo corporativo) ===== */
        .panel-indicadores { 
            display: grid; 
            grid-template-columns: repeat(4, 1fr); 
            gap: 16px; 
            margin: 0 0 30px 0; 
        }
        .tarjeta-indicador {
            background: white;
            border-radius: 14px;
            padding: 16px 18px;
            border: 1px solid #e2e8f0;
            position: relative;
            overflow: hidden;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .tarjeta-indicador::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: #1e3a5f;
        }
        .tarjeta-indicador:hover {
            box-shadow: 0 8px 20px -10px rgba(30,58,95,0.15);
            transform: translateY(-1px);
        }
        .ind-rentabilidad::before { background: #d4af37; }
        .ind-rentabilidad.positivo::before { background: #d4af37; }
        .ind-rentabilidad.negativo::before { background: #7f1d1d; }
        .ind-envios::before { background: #1e3a5f; }
        .ind-creditos::before { background: #2c4a6e; }
        .ind-riesgo::before { background: #64748b; }
        .ind-riesgo.riesgo-alto::before { background: #7f1d1d; }
        .ind-riesgo.riesgo-bajo::before { background: #d4af37; }
        
        .tarjeta-indicador .ti-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .tarjeta-indicador .ti-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            background: #eff6ff;
            color: #1e3a5f;
            flex-shrink: 0;
        }
        .ind-rentabilidad .ti-icon { background: #fffbeb; color: #b8941e; }
        .ind-rentabilidad.negativo .ti-icon { background: #fef2f2; color: #7f1d1d; }
        .ind-envios .ti-icon { background: #eff6ff; color: #1e3a5f; }
        .ind-creditos .ti-icon { background: #eff6ff; color: #2c4a6e; }
        .ind-riesgo .ti-icon { background: #f1f5f9; color: #64748b; }
        .ind-riesgo.riesgo-alto .ti-icon { background: #fef2f2; color: #7f1d1d; }
        .ind-riesgo.riesgo-bajo .ti-icon { background: #fffbeb; color: #b8941e; }
        
        .tarjeta-indicador .ti-label {
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.9px;
            color: #64748b;
            font-weight: 700;
            line-height: 1.3;
        }
        .tarjeta-indicador .ti-body {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .tarjeta-indicador .ti-valor {
            font-size: 1.5rem;
            font-weight: 800;
            line-height: 1.1;
            color: #1e3a5f;
            letter-spacing: -0.5px;
            font-variant-numeric: tabular-nums;
        }
        .ind-rentabilidad .ti-valor { color: #b8941e; }
        .ind-rentabilidad.negativo .ti-valor { color: #7f1d1d; }
        .ind-envios .ti-valor { color: #1e3a5f; }
        .ind-creditos .ti-valor { color: #2c4a6e; }
        .ind-riesgo .ti-valor { color: #64748b; }
        .ind-riesgo.riesgo-alto .ti-valor { color: #7f1d1d; }
        .ind-riesgo.riesgo-bajo .ti-valor { color: #b8941e; }
        
        .tarjeta-indicador .ti-sub {
            font-size: 0.7rem;
            color: #94a3b8;
            font-weight: 500;
        }
        .tarjeta-indicador .ti-detalle {
            font-size: 0.72rem;
            color: #475569;
            margin-top: 4px;
            padding-top: 8px;
            border-top: 1px solid #f1f5f9;
            font-weight: 600;
        }
        
        /* Modo oscuro */
        body.dark-mode .tarjeta-indicador {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .tarjeta-indicador .ti-label { color: #94a3b8; }
        body.dark-mode .tarjeta-indicador .ti-sub { color: #64748b; }
        body.dark-mode .tarjeta-indicador .ti-valor { color: #f0e6d0; }
        body.dark-mode .tarjeta-indicador .ti-icon {
            background: #1e2a3a;
            color: #f0e6d0;
        }
        body.dark-mode .tarjeta-indicador .ti-detalle {
            color: #cbd5e1;
            border-top-color: #3a3a3a;
        }
                /* ===== DIEZMOS - LAYOUT EN COLUMNAS Y TARJETAS ===== */
        .diezmos-grid-3col {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 15px;
        }
        .diezmos-grid-2col {
            display: grid;
            grid-template-columns: 1.4fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }
        .diezmos-col {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }
        .diezmos-col .sub-titulo {
            margin: 0 0 10px 0;
            font-size: 0.9rem;
            padding: 10px 20px;
        }
        .diezmos-mini-tabla {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .diezmos-mini-tabla td {
            padding: 12px 14px;
            border: 1px solid #e2e8f0;
            font-size: 14px;
            vertical-align: middle;
            line-height: 1.4;
        }
        .diezmos-mini-tabla td:first-child {
            background: #f8fafc;
            font-weight: 600;
            color: #1e3a5f;
            width: 55%;
        }
        .diezmos-mini-tabla input,
        .diezmos-mini-tabla select {
            padding: 10px 14px;
            font-size: 14px;
            border-radius: 12px;
        }
        .diezmos-mini-tabla input.input-pesos {
            font-weight: 700;
            text-align: right;
        }

        /* Tarjetas compactas de totales */
        .diezmos-totales-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
            margin-bottom: 10px;
        }
        .diezmos-total-card {
            padding: 12px 16px;
            border-radius: 14px;
            border: 2px solid;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        }
        .diezmos-total-titulo {
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            display: flex;
            align-items: center;
            gap: 6px;
            line-height: 1.2;
        }
        .diezmos-total-valor {
            font-size: 1.2rem;
            font-weight: 800;
            white-space: nowrap;
        }

        /* Modo oscuro */
        body.dark-mode .diezmos-mini-tabla {
            background: #2a2a2a;
            box-shadow: 0 1px 4px rgba(0,0,0,0.4);
        }
        body.dark-mode .diezmos-mini-tabla td {
            border-color: #444;
            color: #e0e0e0;
        }
        body.dark-mode .diezmos-mini-tabla td:first-child {
            background: #1e2a3a;
            color: #f0e6d0;
        }
        body.dark-mode .diezmos-total-card {
            box-shadow: 0 2px 6px rgba(0,0,0,0.4);
        }

        /* Responsive */
        @media (max-width: 900px) {
            .diezmos-grid-3col,
            .diezmos-grid-2col {
                grid-template-columns: 1fr;
            }
            .diezmos-total-valor { font-size: 1.05rem; }
            .diezmos-total-titulo { font-size: 0.62rem; }
        }
        /* ===== PLATAFORMA: TOPBAR, SIDEBAR, DASHBOARD ===== */
        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 22px;
            background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
            border-radius: 22px;
            color: white;
            margin-bottom: 20px;
            flex-wrap: wrap;
            box-shadow: 0 6px 20px -8px rgba(30,58,95,0.5);
        }
        .topbar-brand {
            display: flex;
            align-items: center;
            gap: 14px;
            font-weight: 700;
            font-size: 1rem;
        }
        .topbar-logo {
            height: 42px;
            width: auto;
            max-width: 100px;
            object-fit: contain;
            background: #ffffff;
            padding: 5px 12px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        .topbar-logo-fallback {
            display: none;
            align-items: center;
            justify-content: center;
            height: 42px;
            padding: 5px 14px;
            background: #ffffff;
            color: #1e3a5f;
            border-radius: 12px;
            font-weight: 800;
            font-size: 0.9rem;
            letter-spacing: 1px;
        }

        .topbar-subtitle {
            font-size: 0.7rem;
            opacity: 0.75;
            font-weight: 400;
            letter-spacing: 0.5px;
        }
        .topbar-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        .topbar-btn {
            padding: 8px 15px;
            border-radius: 30px;
            border: none;
            background: rgba(255,255,255,0.12);
            color: white;
            font-weight: 600;
            font-size: 0.76rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
            font-family: inherit;
        }
        .topbar-btn:hover {
            background: #d4af37;
            color: #1e3a5f;
            transform: translateY(-1px);
        }

        /* Layout principal */
        .app-layout {
            display: grid;
            grid-template-columns: 260px 1fr;
            gap: 22px;
            align-items: start;
        }

        /* Sidebar */
        .sidebar {
            background: #f8fafc;
            border-radius: 22px;
            padding: 16px 14px;
            border: 1px solid #e2e8f0;
            position: sticky;
            top: 20px;
            max-height: calc(100vh - 40px);
            overflow-y: auto;
            transition: background 0.3s, border-color 0.3s;
        }
        .sidebar::-webkit-scrollbar { width: 6px; }
        .sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
        .sidebar-group { margin-bottom: 16px; }
        .sidebar-group-title {
            font-size: 0.62rem;
            font-weight: 800;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            padding: 4px 10px 6px;
        }
        .sidebar-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 9px 12px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 600;
            color: #475569;
            transition: all 0.15s;
            margin-bottom: 2px;
        }
        .sidebar-item:hover {
            background: #e2e8f0;
            color: #1e3a5f;
        }
        .sidebar-item.active {
            background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
            color: white;
            box-shadow: 0 4px 12px -3px rgba(30,58,95,0.4);
        }
        .sidebar-icon {
            display: inline-flex;
            justify-content: center;
            width: 20px;
            margin-right: 6px;
        }
        .sidebar-item.active .sidebar-icon { color: #d4af37; }

        /* Panels */
        .tab-panel { display: none; }
        .tab-panel.active {
            display: block;
            animation: fadeInTab 0.25s ease;
        }
        @keyframes fadeInTab {
            from { opacity: 0; transform: translateY(6px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* Dashboard Home */
        .dashboard-home { display: grid; gap: 20px; }
        .dash-hero {
            background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
            color: white;
            padding: 28px 30px;
            border-radius: 24px;
            display: flex;
            justify-content: space-between;
            gap: 20px;
            flex-wrap: wrap;
            align-items: center;
            box-shadow: 0 10px 30px -10px rgba(30,58,95,0.4);
        }
        .dash-hero h2 {
            color: white !important;
            border: none !important;
            background: none !important;
            padding: 0 !important;
            margin: 6px 0 6px !important;
            font-size: 1.7rem !important;
        }        .dash-kpis {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 16px;
        }

        /* ===== TARJETAS KPI DEL DASHBOARD (estilo corporativo) ===== */
        .dash-kpi {
            background: white;
            border-radius: 14px;
            padding: 18px 20px;
            border: 1px solid #e2e8f0;
            position: relative;
            overflow: hidden;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .dash-kpi::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: #1e3a5f;
        }
        .dash-kpi:hover {
            box-shadow: 0 8px 20px -10px rgba(30,58,95,0.15);
            transform: translateY(-1px);
        }
        .dash-kpi.kpi-checklist::before { background: #1e3a5f; }
        .dash-kpi.kpi-rentabilidad::before { background: #d4af37; }
        .dash-kpi.kpi-rentabilidad.kpi-negativo::before { background: #7f1d1d; }
        .dash-kpi.kpi-envios::before { background: #2c4a6e; }
        .dash-kpi.kpi-riesgo::before { background: #64748b; }
        .dash-kpi.kpi-riesgo.kpi-riesgo-alto::before { background: #7f1d1d; }
        .dash-kpi.kpi-riesgo.kpi-riesgo-bajo::before { background: #d4af37; }
        
        .dash-kpi-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .dash-kpi-icon {
            width: 34px;
            height: 34px;
            border-radius: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            background: #eff6ff;
            color: #1e3a5f;
            flex-shrink: 0;
        }
        .kpi-rentabilidad .dash-kpi-icon {
            background: #fffbeb;
            color: #b8941e;
        }
        .kpi-rentabilidad.kpi-negativo .dash-kpi-icon {
            background: #fef2f2;
            color: #7f1d1d;
        }
        .kpi-envios .dash-kpi-icon {
            background: #eff6ff;
            color: #2c4a6e;
        }
        .kpi-riesgo .dash-kpi-icon {
            background: #f1f5f9;
            color: #64748b;
        }
        .kpi-riesgo.kpi-riesgo-alto .dash-kpi-icon {
            background: #fef2f2;
            color: #7f1d1d;
        }
        .kpi-riesgo.kpi-riesgo-bajo .dash-kpi-icon {
            background: #fffbeb;
            color: #b8941e;
        }
        
        .dash-kpi-label {
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.9px;
            color: #64748b;
            font-weight: 700;
            line-height: 1.3;
        }
        
        .dash-kpi-body {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .dash-kpi-value {
            font-size: 1.55rem;
            font-weight: 800;
            line-height: 1.1;
            color: #1e3a5f;
            letter-spacing: -0.5px;
            font-variant-numeric: tabular-nums;
        }
        .kpi-rentabilidad .dash-kpi-value { color: #b8941e; }
        .kpi-rentabilidad.kpi-negativo .dash-kpi-value { color: #7f1d1d; }
        .kpi-envios .dash-kpi-value { color: #2c4a6e; }
        .kpi-riesgo .dash-kpi-value { color: #64748b; }
        .kpi-riesgo.kpi-riesgo-alto .dash-kpi-value { color: #7f1d1d; }
        .kpi-riesgo.kpi-riesgo-bajo .dash-kpi-value { color: #b8941e; }
        
        .dash-kpi-sub {
            font-size: 0.7rem;
            color: #94a3b8;
            font-weight: 500;
        }
        
        .dash-kpi-bar {
            height: 3px;
            background: #e2e8f0;
            border-radius: 4px;
            overflow: hidden;
            margin-top: auto;
        }
        .dash-kpi-bar > div {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }
        
        /* Modo oscuro */
        body.dark-mode .dash-kpi {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .dash-kpi-label { color: #94a3b8; }
        body.dark-mode .dash-kpi-sub { color: #64748b; }
        body.dark-mode .dash-kpi-value { color: #f0e6d0; }
        body.dark-mode .dash-kpi-icon {
            background: #1e2a3a;
            color: #f0e6d0;
        }
        body.dark-mode .dash-kpi-bar { background: #3a3a3a; }
     
   .dash-info-strip {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 16px 22px;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-radius: 16px;
            border-left: 5px solid #d4af37;
            flex-wrap: wrap;
        }
        .dash-info-item {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 180px;
        }
        .dash-info-item > i {
            font-size: 1.3rem;
            color: #d4af37;
        }
        .dash-info-label {
            font-size: 0.65rem;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            font-weight: 700;
        }
        .dash-info-value {
            font-size: 0.9rem;
            color: #1e3a5f;
            font-weight: 700;
            margin-top: 2px;
        }
        .dash-info-divider {
            width: 1px;
            height: 30px;
            background: #e2e8f0;
        }
        body.dark-mode .dash-info-strip { background: #2a2a2a; }
        body.dark-mode .dash-info-value { color: #f0e6d0; }
        body.dark-mode .dash-info-divider { background: #444; }
        .dash-grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 18px;
        }
        .dash-card {
            background: white;
            border-radius: 20px;
            padding: 22px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 14px -8px rgba(0,0,0,0.1);
        }
        .dash-card h3 {
            color: #1e3a5f;
            font-size: 0.95rem;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .dash-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .dash-list li {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 0;
            border-bottom: 1px solid #f1f5f9;
            font-size: 0.85rem;
            color: #475569;
        }
        .dash-list li:last-child { border-bottom: none; }
        .dash-list li i { width: 20px; text-align: center; }
        .dash-list li strong { color: #1e3a5f; margin-left: auto; font-size: 1rem; }
        .dash-quick-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        .dash-quick-btn {
            padding: 11px 14px;
            border-radius: 14px;
            border: 2px solid #d4af37;
            background: white;
            color: #1e3a5f;
            font-weight: 700;
            font-size: 0.78rem;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .dash-quick-btn:hover {
            background: #d4af37;
            transform: translateY(-2px);
            box-shadow: 0 6px 14px -5px rgba(212,175,55,0.5);
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .app-layout { grid-template-columns: 1fr; }
            .sidebar { position: static; max-height: none; }
            .dash-grid-2 { grid-template-columns: 1fr; }
        }

        /* Modo oscuro */
        body.dark-mode .topbar { background: linear-gradient(135deg, #0a2a4a, #1a3a5f); }
        body.dark-mode .sidebar { background: #1e1e1e; border-color: #444; }
        body.dark-mode .sidebar-group-title { color: #94a3b8; }
        body.dark-mode .sidebar-item { color: #cbd5e1; }
        body.dark-mode .sidebar-item:hover { background: #2a2a2a; color: #f0e6d0; }
        body.dark-mode .sidebar-item.active { background: linear-gradient(135deg, #0a2a4a, #1a3a5f); }
        body.dark-mode .dash-kpi,
        body.dark-mode .dash-card { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
        body.dark-mode .dash-kpi-label { color: #94a3b8; }
        body.dark-mode .dash-card h3 { color: #f0e6d0; }
        body.dark-mode .dash-list li { color: #cbd5e1; border-bottom-color: #333; }
        body.dark-mode .dash-list li strong { color: #d4af37; }
        body.dark-mode .dash-quick-btn { background: #2a2a2a; }
        body.dark-mode .dash-quick-btn:hover { background: #d4af37; color: #1e1e1e; }

        /* ===== HEADER DENTRO DE LA BARRA AZUL (SOLO PANTALLA) ===== */
        .header-title {
            background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
            color: white;
            padding: 30px 30px 24px;
            border-radius: 24px 24px 0 0;
            margin: 0;
            text-align: center;
            box-shadow: 0 10px 30px -10px rgba(30,58,95,0.4);
        }
        .header-title .logo-container {
            display: inline-flex;
            background: #ffffff;
            padding: 12px 28px;
            border-radius: 60px;
            margin-bottom: 20px;
            box-shadow: 0 4px 14px rgba(0,0,0,0.15);
            gap: 24px;
        }
        
        /* Unir header-title con dash-hero (que se vean como uno solo) */
        #tab-home .dashboard-home { gap: 0; }
        #tab-home .dash-hero {
            border-radius: 0 0 24px 24px;
            margin-bottom: 20px;
            box-shadow: none;
            border-top: 1px solid rgba(212,175,55,0.35);
        }
        /* Modo oscuro */
        body.dark-mode .header-title {
            background: linear-gradient(135deg, #0a2a4a, #1a3a5f);
        }
        body.dark-mode .header-title h1 {
            color: #f0e6d0 !important;
        }
        body.dark-mode .header-title .logo-container {
            background: #f0e6d0;
        }      

        /* ===== BREADCRUMB Y BADGES ===== */
        .panel-breadcrumb {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-radius: 14px;
            margin-bottom: 20px;
            border-left: 4px solid #d4af37;
            font-size: 0.82rem;
            flex-wrap: wrap;
        }
        .panel-breadcrumb .bc-item {
            color: #64748b;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .panel-breadcrumb .bc-item.bc-home {
            cursor: pointer;
            color: #1e3a5f;
            transition: all 0.2s;
        }
        .panel-breadcrumb .bc-item.bc-home:hover {
            color: #d4af37;
        }
        .panel-breadcrumb .bc-current {
            color: #1e3a5f;
            font-weight: 700;
        }
        .panel-breadcrumb .bc-sep {
            font-size: 0.6rem;
            color: #cbd5e1;
        }
        
        .sidebar-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 2px 8px;
            border-radius: 20px;
            font-size: 0.62rem;
            font-weight: 800;
            min-width: 24px;
            line-height: 1.4;
            margin-left: auto;
        }
        .sidebar-badge.badge-ok { background: #d1fae5; color: #065f46; }
        .sidebar-badge.badge-info { background: #dbeafe; color: #1e40af; }
        .sidebar-item.active .sidebar-badge.badge-ok { background: #10b981; color: white; }
        .sidebar-item.active .sidebar-badge.badge-info { background: #3b82f6; color: white; }
        
        body.dark-mode .panel-breadcrumb {
            background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
        }
        body.dark-mode .panel-breadcrumb .bc-item { color: #94a3b8; }
        body.dark-mode .panel-breadcrumb .bc-item.bc-home,
        body.dark-mode .panel-breadcrumb .bc-current { color: #f0e6d0; }


        /* ===== HEADER PRINCIPAL DEL DASHBOARD ===== */
        .header-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 30px;
            background: #ffffff;
            padding: 24px 30px;
            border-radius: 20px;
            margin-bottom: 24px;
            border-bottom: 3px solid #d4af37;
            box-shadow: 0 4px 14px -8px rgba(30,58,95,0.15);
            flex-wrap: wrap;
        }
        .header-logos {
            display: flex;
            align-items: center;
            gap: 20px;
            flex-shrink: 0;
        }
                .header-logos img {
            height: 70px;
            width: auto;
            max-width: 130px;
            object-fit: contain;
            transition: transform 0.2s;
        }
        .header-logos img:hover { transform: scale(1.05); }
                .logo-fallback {
            display: none;
            align-items: center;
            justify-content: center;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            font-size: 11px;
            font-weight: 800;
            text-align: center;
            padding: 5px;
            letter-spacing: 0.5px;
        }
        .header-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
            text-align: right;
            flex: 1;
            min-width: 280px;
            align-items: flex-end;
        }
        .header-info h1 {
            color: #1e3a5f;
            font-size: 1.35rem;
            font-weight: 700;
            border: none;
            margin: 0;
            padding: 0;
            letter-spacing: -0.3px;
            line-height: 1.2;
        }
        .header-info h2 {
            color: #64748b;
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            border: none;
            border-left: none;
            background: none;
            padding: 0;
            margin: 0 0 10px 0;
        }
        .header-action-btn {
            padding: 10px 22px;
            border-radius: 40px;
            border: none;
            background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
            color: white;
            font-weight: 700;
            font-size: 0.82rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: inherit;
            transition: all 0.25s;
            box-shadow: 0 4px 12px -4px rgba(30,58,95,0.4);
        }
        .header-action-btn:hover {
            background: linear-gradient(135deg, #d4af37, #b8941e);
            color: #1e3a5f;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px -4px rgba(212,175,55,0.5);
        }
        .header-action-btn.estado-comenzar { background: linear-gradient(135deg, #10b981, #059669); }
        .header-action-btn.estado-comenzar:hover { background: linear-gradient(135deg, #059669, #047857); color: white; }
        .header-action-btn.estado-continuar { background: linear-gradient(135deg, #3b82f6, #2563eb); }
        .header-action-btn.estado-continuar:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; }
        .header-action-btn.estado-completo { background: linear-gradient(135deg, #d4af37, #b8941e); color: #1e3a5f; }
        .header-action-btn.estado-completo:hover { background: linear-gradient(135deg, #facc15, #eab308); color: #1e3a5f; }
        /* Modo oscuro */
        body.dark-mode .header-title {
            background: #2a2a2a;
            border-bottom-color: #d4af37;
        }
        body.dark-mode .header-info h1 { color: #f0e6d0; }
        body.dark-mode .header-info h2 { color: #94a3b8; }

        /* Responsive */
        @media (max-width: 900px) {
            .header-title {
                flex-direction: column;
                text-align: center;
                padding: 20px;
            }
            .header-info {
                align-items: center;
                text-align: center;
            }
            .header-logos img { height: 55px; }
        }
        /* ===== PORTADA PDF Y MINI-HEADER (solo se ven al imprimir) ===== */
        .pdf-cover { display: none; }
        .print-page-header { display: none; }
        .print-page-footer { display: none; }
        
        /* Estilos para los elementos de la portada que también se usan fuera */
        .pdf-cover-band {
            height: 4px;
            background: linear-gradient(90deg, #d4af37, #1e3a5f, #d4af37);
        }
        .pdf-cover-logos {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12mm;
        }
        .pdf-cover-logos img {
            height: 22mm;
            width: auto;
            object-fit: contain;
        }
        .pdf-cover-h1 {
            color: #1e3a5f;
            font-size: 18pt;
            font-weight: 800;
            letter-spacing: 0.5px;
            margin: 0;
            padding: 0;
            border: none;
            line-height: 1.2;
            display: block;
            text-align: center;
        }
        .pdf-cover-h2 {
            color: #64748b;
            font-size: 11pt;
            font-weight: 700;
            letter-spacing: 3px;
            margin: 0;
            padding: 0;
            border: none;
            background: none;
            text-transform: uppercase;
            text-align: center;
        }
        .pdf-cover-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0;
        }
        .pdf-cover-table td {
            padding: 2.5mm 3mm;
            border: 1px solid #cbd5e1;
            font-size: 9pt;
            vertical-align: middle;
        }
        .pdf-cover-table td:nth-child(odd) {
            background: #f1f5f9;
            color: #1e3a5f;
            font-weight: 700;
            width: 22%;
        }
        .pdf-cover-table td:nth-child(even) {
            background: white;
            color: #1e293b;
            width: 28%;
            font-weight: 500;
        }
        .pdf-cover-kpis {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 3mm;
        }
        .pdf-cover-kpi {
            padding: 4mm 2mm;
            border-radius: 2mm;
            text-align: center;
            border: 1.5px solid #1e3a5f;
        }
               .pdf-cover-kpi-icon { 
            display: block; 
            margin-bottom: 2mm;
            line-height: 1;
            height: 8mm;
        }
        .pdf-cover-kpi-icon i {
            font-size: 18pt;
            display: inline-block;
            vertical-align: middle;
        }
        .pdf-cover-kpi-valor { 
            font-size: 16pt; 
            font-weight: 800; 
            display: block; 
            line-height: 1;
            margin-bottom: 1.5mm;
        }
        .pdf-cover-kpi-label { 
            font-size: 7pt; 
            text-transform: uppercase; 
            letter-spacing: 0.5px; 
            font-weight: 700;
            color: #64748b;
        }
        .pdf-cover-block {
            margin: 0 0 8mm 0;
            padding: 0;
        }
        .pdf-cover-block-title {
            font-size: 9pt;
            font-weight: 800;
            color: #1e3a5f;
            letter-spacing: 1.5px;
            padding-bottom: 2mm;
            margin-bottom: 3mm;
            border-bottom: 2px solid #d4af37;
        }
        .pdf-cover-titles {
            text-align: center;
            margin-bottom: 15mm;
        }
        .pdf-cover-line {
            width: 60%;
            height: 3px;
            background: #d4af37;
            margin: 0 auto 8mm;
        }
        .pdf-cover-line.thin { 
            height: 1px; 
            width: 40%; 
            margin: 6mm auto;
            background: #1e3a5f;
        }
        .pdf-cover-footer {
            text-align: center;
            font-size: 8pt;
            color: #64748b;
            font-weight: 500;
            margin-top: 6mm;
            line-height: 1.6;
        }

/* ===== INPUTS READONLY (campos auto-rellenos que no se editan) ===== */
.input-readonly {
    background: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
    font-weight: 500;
}
.input-readonly:focus {
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}
body.dark-mode .input-readonly {
    background: #1e2a3a !important;
    color: #94a3b8 !important;
    border-color: #3a3a3a !important;
}
body.dark-mode .input-readonly:focus {
    border-color: #3a3a3a !important;
}

        /* ===== PROGRESS BAR ===== */
        #progress-container {
            background: #f1f5f9;
            border-radius: 40px;
            padding: 12px 24px;
            display: flex;
            align-items: center;
            gap: 24px;
            flex-wrap: wrap;
            margin: 20px 0;
            border: 1px solid #e2e8f0;
            transition: background 0.3s, border-color 0.3s;
        }
        #progress-container .progress-text { font-size: 0.8rem; color: #475569; font-weight: 500; }
        #progress-container .progress-track { flex: 1; min-width: 120px; }
        #progress-container .progress-track .bar { height: 12px; background: #e2e8f0; border-radius: 20px; overflow: hidden; }
        #progress-container .progress-track .bar .fill { height: 100%; background: linear-gradient(90deg, #1e3a5f, #d4af37); border-radius: 20px; width: 0%; transition: width 0.5s ease; }
        #progress-container .stats { display: flex; gap: 20px; font-size: 0.75rem; color: #1e293b; font-weight: 500; flex-wrap: wrap; }
        #progress-container .stats span i { margin-right: 4px; }

        /* ===== NAVEGACIÓN RÁPIDA ===== */
        .nav-index {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 12px;
            background: #f8fafc;
            padding: 12px 20px;
            border-radius: 40px;
            margin: 10px 0 20px 0;
            border: 1px solid #e2e8f0;
            transition: background 0.3s, border-color 0.3s;
        }
        .nav-index a {
            color: #1e3a5f;
            text-decoration: none;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 30px;
            transition: 0.2s;
            background: white;
            border: 1px solid transparent;
        }
        .nav-index a:hover {
            background: #d4af37;
            color: white;
            border-color: #d4af37;
        }

        /* ===== BOTÓN VOLVER ARRIBA ===== */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: #1e3a5f;
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
            z-index: 999;
        }
        .back-to-top:hover {
            background: #d4af37;
            transform: scale(1.1);
        }
        body.dark-mode .back-to-top {
            background: #0a2a4a;
            color: #f0e6d0;
        }
        body.dark-mode .back-to-top:hover {
            background: #d4af37;
            color: #1e1e1e;
        }

        /* ===== BOTÓN MODO OSCURO ===== */
        .dark-toggle {
            position: fixed;
            bottom: 100px;
            right: 30px;
            background: #1e3a5f;
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            font-size: 22px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
            z-index: 999;
        }
        .dark-toggle:hover {
            transform: scale(1.1);
            background: #d4af37;
            color: #1e1e1e;
        }
        body.dark-mode .dark-toggle {
            background: #d4af37;
            color: #1e1e1e;
        }
        body.dark-mode .dark-toggle:hover {
            background: #f0e6d0;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 900px) {
            body { padding: 15px; }
            .container { padding: 20px; }
            .dashboard-grid { grid-template-columns: 1fr; }
            .gasto-item select { width: 100%; }
            .gasto-item input { width: 100%; }
            .checklist-respuesta { flex-wrap: wrap; }
            .panel-indicadores { grid-template-columns: repeat(2, 1fr); }
            .dashboard-card { max-width: 100%; }
            #progress-container { flex-direction: column; align-items: stretch; gap: 12px; }
            .nav-index { justify-content: center; }
            .back-to-top, .dark-toggle { width: 44px; height: 44px; font-size: 18px; right: 15px; }
            .dark-toggle { bottom: 85px; }
        }
        @media (max-width: 500px) {
            .panel-indicadores { grid-template-columns: 1fr; }
        }
        /* ===== CUADRO EVALUATIVO DE RENTABILIDAD (dashboard ejecutivo) ===== */
        .rentabilidad-container {
            background: white;
            border-radius: 20px;
            padding: 24px 28px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 16px -8px rgba(30,58,95,0.08);
        }
        
        .rentabilidad-cards {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }
        .rentabilidad-card {
            background: white;
            border-radius: 14px;
            padding: 18px 20px;
            border: 1px solid #e2e8f0;
            position: relative;
            overflow: hidden;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .rentabilidad-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: #1e3a5f;
        }
        .rentabilidad-card:hover {
            box-shadow: 0 8px 20px -10px rgba(30,58,95,0.15);
            transform: translateY(-1px);
        }
        .rentabilidad-card-ingresos::before { background: #1e3a5f; }
        .rentabilidad-card-gastos::before { background: #7f1d1d; }
        .rentabilidad-card-resultado.positivo::before { background: #d4af37; }
        .rentabilidad-card-resultado.negativo::before { background: #7f1d1d; }
        
        .rentabilidad-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .rentabilidad-card-icon {
            width: 34px;
            height: 34px;
            border-radius: 9px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            background: #eff6ff;
            color: #1e3a5f;
            flex-shrink: 0;
        }
        .rentabilidad-card-gastos .rentabilidad-card-icon {
            background: #fef2f2;
            color: #7f1d1d;
        }
        .rentabilidad-card-resultado.positivo .rentabilidad-card-icon {
            background: #fffbeb;
            color: #b8941e;
        }
        .rentabilidad-card-resultado.negativo .rentabilidad-card-icon {
            background: #fef2f2;
            color: #7f1d1d;
        }
        .rentabilidad-card-label {
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.9px;
            color: #64748b;
            line-height: 1.3;
        }
        
        .rentabilidad-card-body {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .rentabilidad-card-value {
            font-size: 1.45rem;
            font-weight: 800;
            line-height: 1.1;
            color: #1e3a5f;
            letter-spacing: -0.5px;
            font-variant-numeric: tabular-nums;
        }
        .rentabilidad-card-gastos .rentabilidad-card-value { color: #7f1d1d; }
        .rentabilidad-card-resultado.positivo .rentabilidad-card-value { color: #1e3a5f; }
        .rentabilidad-card-resultado.negativo .rentabilidad-card-value { color: #7f1d1d; }
        .rentabilidad-card-sub {
            font-size: 0.7rem;
            color: #94a3b8;
            font-weight: 500;
        }
        
        /* Resumen de rentabilidad */
        .rentabilidad-resumen-box {
            background: #f8fafc;
            border-radius: 14px;
            padding: 20px 22px;
            border: 1px solid #e2e8f0;
        }
        .rentabilidad-resumen-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 14px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e2e8f0;
        }
        .rentabilidad-resumen-header-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: #1e3a5f;
            color: white;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            flex-shrink: 0;
        }
        .rentabilidad-resumen-header-title {
            font-size: 0.85rem;
            font-weight: 800;
            color: #1e3a5f;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }
        
        .rentabilidad-resumen {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            border-radius: 12px;
            background: white;
            border: 1px solid #e2e8f0;
            border-left: 4px solid #1e3a5f;
        }
        .rentabilidad-resumen-icon {
            font-size: 1.3rem;
            color: #1e3a5f;
            flex-shrink: 0;
            width: 36px;
            height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: #eff6ff;
        }
        .rentabilidad-resumen-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .rentabilidad-resumen-titulo {
            font-size: 0.8rem;
            font-weight: 800;
            color: #1e3a5f;
            letter-spacing: 0.6px;
            text-transform: uppercase;
        }
        .rentabilidad-resumen-detalle {
            font-size: 0.75rem;
            color: #64748b;
            font-weight: 500;
        }
        
        .rentabilidad-resumen-excelente {
            border-left-color: #d4af37;
            background: #fffdf5;
        }
        .rentabilidad-resumen-excelente .rentabilidad-resumen-icon {
            background: #fffbeb;
            color: #b8941e;
        }
        .rentabilidad-resumen-excelente .rentabilidad-resumen-titulo { color: #b8941e; }
        
        .rentabilidad-resumen-bueno {
            border-left-color: #1e3a5f;
        }
        
        .rentabilidad-resumen-aceptable {
            border-left-color: #64748b;
            background: #f8fafc;
        }
        .rentabilidad-resumen-aceptable .rentabilidad-resumen-icon {
            background: #f1f5f9;
            color: #64748b;
        }
        .rentabilidad-resumen-aceptable .rentabilidad-resumen-titulo { color: #64748b; }
        
        .rentabilidad-resumen-neutro {
            border-left-color: #94a3b8;
        }
        .rentabilidad-resumen-neutro .rentabilidad-resumen-icon {
            background: #f1f5f9;
            color: #94a3b8;
        }
        .rentabilidad-resumen-neutro .rentabilidad-resumen-titulo { color: #94a3b8; }
        
        .rentabilidad-resumen-critico {
            border-left-color: #7f1d1d;
            background: #fef7f7;
        }
        .rentabilidad-resumen-critico .rentabilidad-resumen-icon {
            background: #fef2f2;
            color: #7f1d1d;
        }
        .rentabilidad-resumen-critico .rentabilidad-resumen-titulo { color: #7f1d1d; }
        
        /* Barra de progreso */
        .rentabilidad-barra-container {
            margin-top: 16px;
        }
        .rentabilidad-barra-track {
            height: 30px;
            background: #e2e8f0;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
        }
        .rentabilidad-barra-fill {
            height: 100%;
            border-radius: 8px;
            transition: width 0.6s ease, background 0.3s;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 14px;
            color: white;
            font-weight: 800;
            font-size: 0.8rem;
            letter-spacing: 0.5px;
            background: #1e3a5f;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .rentabilidad-cards {
                grid-template-columns: 1fr;
            }
        }
        
        /* Modo oscuro */
        body.dark-mode .rentabilidad-container {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .rentabilidad-card {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .rentabilidad-card-label { color: #94a3b8; }
        body.dark-mode .rentabilidad-card-sub { color: #64748b; }
        body.dark-mode .rentabilidad-card-value { color: #f0e6d0; }
        body.dark-mode .rentabilidad-card-icon {
            background: #1e2a3a;
            color: #f0e6d0;
        }
        body.dark-mode .rentabilidad-resumen-box {
            background: #1e1e1e;
            border-color: #444;
        }
        body.dark-mode .rentabilidad-resumen-header {
            border-bottom-color: #444;
        }
        body.dark-mode .rentabilidad-resumen-header-title { color: #f0e6d0; }
        body.dark-mode .rentabilidad-resumen {
            background: #2a2a2a;
            border-color: #444;
        }
        body.dark-mode .rentabilidad-resumen-titulo { color: #f0e6d0; }
        body.dark-mode .rentabilidad-barra-track { background: #3a3a3a; }
      
  /* ===== TABLA RESUMEN (estilo corporativo) ===== */
        .tabla-resumen th {
            background: #1e3a5f !important;
            color: white !important;
            font-size: 0.72rem !important;
            letter-spacing: 0.8px;
            padding: 12px 10px !important;
        }
        .tabla-resumen td {
            padding: 12px 10px !important;
            font-size: 0.78rem;
            border-bottom: 1px solid #f1f5f9;
        }
        .tabla-resumen tr:nth-child(even) td {
            background: #f8fafc;
        }
        .tabla-resumen .barra-fondo {
            height: 16px !important;
            background: #e2e8f0 !important;
            border-radius: 4px !important;
        }
        .tabla-resumen .barra-progreso {
            border-radius: 4px !important;
            font-size: 0.65rem !important;
            font-weight: 800;
        }

        /* ===== TOASTS ELEGANTES ===== */
        .toast-container {
            position: fixed;
            top: 24px;
            right: 24px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 12px;
            pointer-events: none;
            max-width: 380px;
        }
        .toast {
            pointer-events: auto;
            background: #ffffff;
            border-radius: 14px;
            padding: 16px 20px;
            box-shadow: 0 12px 32px -8px rgba(30,58,95,0.25), 0 0 0 1px rgba(30,58,95,0.08);
            display: flex;
            align-items: flex-start;
            gap: 14px;
            min-width: 300px;
            border-left: 5px solid #1e3a5f;
            animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            transition: all 0.3s ease;
        }
        .toast.toast-salir {
            opacity: 0;
            transform: translateX(120%);
        }
        @keyframes toastIn {
            from { opacity: 0; transform: translateX(120%); }
            to   { opacity: 1; transform: translateX(0); }
        }
        .toast-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            flex-shrink: 0;
            background: #eff6ff;
            color: #1e3a5f;
        }
        .toast-body {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .toast-titulo {
            font-size: 0.82rem;
            font-weight: 800;
            color: #1e3a5f;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }
        .toast-mensaje {
            font-size: 0.85rem;
            color: #475569;
            font-weight: 500;
            line-height: 1.4;
        }
        .toast-close {
            background: transparent;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            font-size: 1rem;
            padding: 4px;
            line-height: 1;
            transition: color 0.2s;
            flex-shrink: 0;
        }
        .toast-close:hover { color: #1e3a5f; }
        
        /* Variantes */
        .toast-success { border-left-color: #10b981; }
        .toast-success .toast-icon { background: #d1fae5; color: #059669; }
        .toast-error { border-left-color: #ef4444; }
        .toast-error .toast-icon { background: #fee2e2; color: #dc2626; }
        .toast-info { border-left-color: #3b82f6; }
        .toast-info .toast-icon { background: #dbeafe; color: #2563eb; }
        .toast-warning { border-left-color: #f59e0b; }
        .toast-warning .toast-icon { background: #fef3c7; color: #d97706; }
        
        /* Modo oscuro */
        body.dark-mode .toast {
            background: #2a2a2a;
            box-shadow: 0 12px 32px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
        }
        body.dark-mode .toast-titulo { color: #f0e6d0; }
        body.dark-mode .toast-mensaje { color: #cbd5e1; }
        body.dark-mode .toast-close { color: #64748b; }
        body.dark-mode .toast-close:hover { color: #f0e6d0; }       

/* ===== SELECTOR DE CONGREGACIÓN EN TOPBAR ===== */
.selector-congregacion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(212,175,55,0.5);
    border-radius: 30px;
    color: white;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 1;
    min-width: 0;
    user-select: none;
}

.selector-congregacion:hover {
    background: rgba(212,175,55,0.2);
    border-color: #d4af37;
    transform: translateY(-1px);
}

.selector-congregacion i:first-child {
    color: #d4af37;
    flex-shrink: 0;
}

.selector-congregacion i:last-child {
    font-size: 0.7rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.selector-congregacion #selectorTexto {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

/* Estado "sin selección" con animación de pulso */
.selector-congregacion.sin-seleccion {
    background: rgba(212,175,55,0.25);
    border-color: #d4af37;
    animation: pulsoDorado 2s ease-in-out infinite;
}

@keyframes pulsoDorado {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(212,175,55,0.7); 
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(212,175,55,0); 
    }
}

/* Modo oscuro */
body.dark-mode .selector-congregacion {
    background: rgba(255,255,255,0.08);
    border-color: rgba(212,175,55,0.4);
}

body.dark-mode .selector-congregacion:hover {
    background: rgba(212,175,55,0.2);
    border-color: #d4af37;
}

body.dark-mode .selector-congregacion.sin-seleccion {
    background: rgba(212,175,55,0.2);
}

/* Responsive */
@media (max-width: 900px) {
    .selector-congregacion {
        max-width: 100%;
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* ===== MODAL DE SELECCIÓN DE CONGREGACIÓN ===== */
.modal-congregacion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-congregacion {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header del modal */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1e3a5f, #2c4a6e);
    color: white;
    flex-shrink: 0;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-header-left > i {
    font-size: 1.6rem;
    color: #d4af37;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-header h2 {
    color: white !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.modal-header p {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

/* Buscador */
.modal-buscador {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
    position: relative;
}

.modal-buscador > i {
    color: #64748b;
    font-size: 1rem;
}

.modal-buscador input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    padding: 4px 0;
    outline: none;
    font-family: inherit;
    color: #1e293b;
}

.modal-buscador input::placeholder {
    color: #94a3b8;
}

.modal-buscador-clear {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
}

.modal-buscador-clear:hover {
    color: #1e3a5f;
}

/* Contenido del modal */
.modal-contenido {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
}

.modal-contenido::-webkit-scrollbar {
    width: 8px;
}

.modal-contenido::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-contenido::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Secciones */
.modal-seccion {
    padding: 12px 0;
}

.modal-seccion-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.modal-seccion-titulo > i {
    color: #d4af37;
    font-size: 0.85rem;
}

.modal-contador {
    margin-left: auto;
    background: #eff6ff;
    color: #1e3a5f;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Lista de congregaciones */
.modal-lista {
    display: flex;
    flex-direction: column;
}

.modal-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    position: relative;
}

.modal-item:hover {
    background: #f8fafc;
    border-left-color: #d4af37;
}

.modal-item.activa {
    background: #fffbeb;
    border-left-color: #d4af37;
}

.modal-item.activa:hover {
    background: #fef3c7;
}

.modal-item-icono {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    color: #1e3a5f;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.modal-item:hover .modal-item-icono {
    background: #dbeafe;
    transform: scale(1.05);
}

.modal-item.activa .modal-item-icono {
    background: #d4af37;
    color: white;
}

.modal-item-info {
    flex: 1;
    min-width: 0;
}

.modal-item-codigo {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.modal-item-nombre {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-item-pastor {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-item-badge.activa {
    background: #d1fae5;
    color: #065f46;
}

.modal-item-badge.activa i {
    color: #10b981;
}

.modal-item-badge.nueva {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Estado vacío */
.modal-vacio {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.modal-vacio > i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.modal-vacio p {
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
    margin: 0 0 4px 0;
}

.modal-vacio span {
    font-size: 0.82rem;
}

/* Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.modal-footer-info i {
    color: #1e3a5f;
}

.modal-btn-cancelar {
    padding: 10px 24px;
    border-radius: 30px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-btn-cancelar:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e3a5f;
}

/* Texto resaltado en búsqueda */
.modal-highlight {
    background: #fef3c7;
    color: #92400e;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 800;
}

/* Modo oscuro */
body.dark-mode .modal-congregacion {
    background: #1e1e1e;
}

body.dark-mode .modal-header {
    background: linear-gradient(135deg, #0a2a4a, #1a3a5f);
}

body.dark-mode .modal-buscador {
    background: #2a2a2a;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .modal-buscador input {
    color: #e0e0e0;
}

body.dark-mode .modal-buscador input::placeholder {
    color: #64748b;
}

body.dark-mode .modal-buscador > i,
body.dark-mode .modal-buscador-clear {
    color: #64748b;
}

body.dark-mode .modal-buscador-clear:hover {
    color: #d4af37;
}

body.dark-mode .modal-item {
    border-left-color: transparent;
}

body.dark-mode .modal-item:hover {
    background: #2a2a2a;
    border-left-color: #d4af37;
}

body.dark-mode .modal-item.activa {
    background: #2a2a1a;
    border-left-color: #d4af37;
}

body.dark-mode .modal-item.activa:hover {
    background: #3a3a1a;
}

body.dark-mode .modal-item-icono {
    background: #1e2a3a;
    color: #f0e6d0;
}

body.dark-mode .modal-item:hover .modal-item-icono {
    background: #2a3a4a;
}

body.dark-mode .modal-item-nombre {
    color: #f0e6d0;
}

body.dark-mode .modal-item-pastor {
    color: #94a3b8;
}

body.dark-mode .modal-item-codigo {
    color: #64748b;
}

body.dark-mode .modal-item-badge.nueva {
    background: #2a2a2a;
    color: #64748b;
}

body.dark-mode .modal-item-badge.activa {
    background: #1a3a1a;
    color: #8bc34a;
}

body.dark-mode .modal-seccion-titulo {
    color: #94a3b8;
}

body.dark-mode .modal-contador {
    background: #1e2a3a;
    color: #90caf9;
}

body.dark-mode .modal-footer {
    background: #2a2a2a;
    border-top-color: #3a3a3a;
}

body.dark-mode .modal-footer-info {
    color: #94a3b8;
}

body.dark-mode .modal-btn-cancelar {
    background: #1e1e1e;
    border-color: #444;
    color: #cbd5e1;
}

body.dark-mode .modal-btn-cancelar:hover {
    background: #2a2a2a;
    color: #f0e6d0;
}

body.dark-mode .modal-vacio {
    color: #64748b;
}

body.dark-mode .modal-vacio > i {
    color: #3a3a3a;
}

body.dark-mode .modal-highlight {
    background: #3a2a1a;
    color: #ffb74d;
}

/* Responsive */
@media (max-width: 600px) {
    .modal-congregacion {
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 16px 18px;
    }
    
    .modal-header h2 {
        font-size: 1rem;
    }
    
    .modal-buscador {
        padding: 12px 18px;
    }
    
    .modal-item {
        padding: 10px 18px;
        gap: 10px;
    }
    
    .modal-item-icono {
        width: 36px;
        height: 36px;
    }
    
    .modal-footer {
        padding: 12px 18px;
    }
    
    .modal-footer-info {
        display: none;
    }
}


 /* ===== IMPRESIÓN ===== */
        @media print {
            body { background: white; padding: 0; margin: 0; }
            .container { box-shadow: none; padding: 15px; max-width: 100%; }
            .no-print, button, input, select, textarea, .btn-group, .btn-eliminar, .btn-agregar, .toolbar, .nav-index, #progress-container, .back-to-top, .dark-toggle { display: none !important; }
            .print-text { display: block !important; white-space: pre-wrap !important; word-wrap: break-word !important; font-family: inherit !important; line-height: 1.5 !important; }
            .print-text { display: block !important; margin-bottom: 5px; }
            h2, h3, .sub-titulo, .punto-romano { page-break-after: avoid !important; break-after: avoid !important; }
            
            /* ===== SECCIONES: estilo ejecutivo sobrio en PDF ===== */
            h2 {
                font-size: 1.05rem !important;
                padding: 6px 0 4px 12px !important;
                margin: 12px 0 8px 0 !important;
                border-left-width: 4px !important;
                border-bottom-width: 2px !important;
            }
            h2[id^="seccion-"] {
                display: flex !important;
                align-items: center !important;
                gap: 10px !important;
                background: none !important;
                border: none !important;
                border-bottom: 2px solid #1e3a5f !important;
                border-radius: 0 !important;
                padding: 6px 0 6px 0 !important;
                margin: 14px 0 8px 0 !important;
                page-break-after: avoid !important;
                break-after: avoid !important;
                page-break-inside: avoid !important;
                break-inside: avoid !important;
            }
                    h2[id^="seccion-"]::before {
            content: attr(data-num);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 46px;
            height: 46px;
            background: linear-gradient(135deg, #d4af37 0%, #b8941e 100%);
            color: #ffffff;
            font-size: 1rem;
            font-weight: 800;
            border-radius: 50%;
            flex-shrink: 0;
            box-shadow: 0 4px 12px -3px rgba(212,175,55,0.55);
            font-family: 'Inter', sans-serif;
            letter-spacing: -0.3px;
            line-height: 1;
        }
        
        /* Si el número tiene más de 1 dígito (10, 11...), reducir font-size */
        h2[data-num="10"]::before,
        h2[data-num="11"]::before,
        h2[data-num="12"]::before,
        h2[data-num="13"]::before,
        h2[data-num="14"]::before,
        h2[data-num="15"]::before {
            font-size: 0.85rem;
        }
            h2[data-num*="."]::before {
                min-width: 22px !important;
                height: 22px !important;
                font-size: 0.68rem !important;
                background: #4b5563 !important;
            }
            h2[id^="seccion-"] > i {
                background: transparent !important;
                color: #1e3a5f !important;
                width: auto !important;
                height: auto !important;
                font-size: 0.95rem !important;
                border-radius: 0 !important;
            }
            h2[id^="seccion-"] .h2-texto {
                color: #1e3a5f !important;
                font-size: 0.95rem !important;
                font-weight: 700 !important;
                letter-spacing: 0.6px !important;
                text-transform: uppercase !important;
            }
            h2[data-num*="."] .h2-texto {
                font-size: 0.82rem !important;
            }
            
            /* Sub-títulos sobrios en PDF */
            .sub-titulo {
                display: block !important;
                background: #f1f5f9 !important;
                color: #1e3a5f !important;
                padding: 4px 10px !important;
                border-left: 3px solid #1e3a5f !important;
                border-radius: 0 4px 4px 0 !important;
                font-size: 0.72rem !important;
                font-weight: 700 !important;
                letter-spacing: 1px !important;
                margin: 8px 0 6px 0 !important;
                page-break-after: avoid !important;
                break-after: avoid !important;
            }
            .sub-titulo > i {
                color: #1e3a5f !important;
                font-size: 0.75rem !important;
                margin-right: 4px !important;
            }
            #tab-home + .tab-panel h2,
            .tab-panel h2 {
                page-break-before: auto !important;
                break-before: auto !important;
            }
            h2, h3, .sub-titulo, .punto-romano { page-break-inside: avoid !important; break-inside: avoid !important; }
            .dinamico-card, .cuadro-evaluativo, .analisis-container, 
            .dashboard-card, .graph-card, .hallazgos-area, .signature-block,
            table, .tabla-credito, .desembolsos-tabla, .terceros-table {
                page-break-inside: avoid !important;
                break-inside: avoid !important;
            }
            .container > *:first-child { page-break-before: avoid !important; break-before: avoid !important; }
            #informe-automatico-container { page-break-before: avoid !important; break-before: avoid !important; page-break-after: avoid !important; break-after: avoid !important; }
            .container { page-break-after: avoid !important; break-after: avoid !important; }
            table, .tabla-credito, .desembolsos-tabla, .terceros-table, .tabla-resumen {
                border-collapse: collapse !important;
                border: 2px solid #000 !important;
                margin: 6px 0 !important;
            }
            th, td {
                padding: 6px 8px !important;
                font-size: 0.78rem !important;
            }
            th, td { border: 1px solid #000 !important; padding: 8px !important; }
            th { background: #1e3a5f !important; color: white !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
            .dinamico-card, .cuadro-evaluativo, .kpi-card, .total-gastos, 
            .cuota-profesional, .hallazgos-area, .signature-block,
            .dashboard-card, .graph-card, .analisis-container {
                border: 2px solid #000 !important;
                margin-bottom: 15px !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
                break-inside: avoid;
            }
            .total-gastos { background: #1e3a5f !important; color: white !important; }
            .kpi-card { background: linear-gradient(135deg, #1e3a5f, #2c4a6e) !important; color: white !important; }
            .cuadro-evaluativo { background: #f0fdf4 !important; border: 2px solid #166534 !important; }
            .cuota-profesional { background: #f0f9ff !important; border: 2px solid #0284c7 !important; }
            .hallazgos-area, .signature-block { background: #f8fafc !important; border: 2px solid #000 !important; }
            .dashboard-card, .graph-card { border: 2px solid #000 !important; }
            .gasto-item { border-bottom: 1px solid #000 !important; padding-bottom: 8px !important; margin-bottom: 8px !important; }
            .graph-card canvas { max-height: 200px; }
            @page { margin: 15mm; size: portrait; }
            .seccion-vacia-pdf { display: none !important; }
            hr { border-top: 2px solid #000 !important; }
            .tabla-credito td:first-child { background: #f1f5f9 !important; font-weight: bold; }
            input[type="month"] { display: none !important; }
            span[id$="_mes_nombre"] { display: inline-block !important; color: #1e3a5f !important; font-weight: bold !important; }
            span[id$="_mes_p"] { display: none !important; }
            #gastosFijos-lista .dinamico-card { break-inside: avoid; page-break-inside: avoid; }
            .gasto-item { display: none !important; }
            div[id^="tabla_gastos_final_"] { margin: 15px 0 !important; border: 1px solid #ccc !important; }
            div[id^="tabla_gastos_final_"] table { width: 100% !important; border-collapse: collapse !important; }
            div[id^="tabla_gastos_final_"] th,
            div[id^="tabla_gastos_final_"] td { border: 1px solid #000 !important; }
            .dinamico-card, .cuadro-evaluativo, .analisis-container,
            .dashboard-card, .graph-card, .hallazgos-area, .signature-block,
            table, .tabla-credito, .desembolsos-tabla, .terceros-table {
                page-break-inside: avoid !important;
                break-inside: avoid !important;
            }
            .no-print, button, .toolbar, .btn-group, .btn-eliminar, .btn-agregar, 
            .btn-agregar-fila, .help-tip, .progress-global, .resumen-ejecutivo,
            .btn, .btn-opt, .btn-agregar, .btn-eliminar {
                display: none !important;
            }
            .container { padding: 10px !important; margin: 0 !important; }
            .logo-item img { max-height: 60px; }
            .tarjeta-indicador { border: 1px solid #000 !important; }
            body.dark-mode .container { background: white !important; }
            body.dark-mode { background: white !important; color: black !important; }
            body.dark-mode .container::before { background: linear-gradient(90deg, #d4af37, #1e3a5f, #d4af37) !important; }

                               /* ===== PLATAFORMA: mostrar todo al imprimir ===== */
            .app-layout { display: block !important; }
            .sidebar { display: none !important; }
            .topbar { display: none !important; }
            .main-content { display: block !important; }
            
            /* Todos los paneles visibles */
            .tab-panel { 
                display: block !important; 
                animation: none !important; 
            }
            
                                   /* PORTADA (portada + datos generales comparten la primera página) */
            #tab-home { 
                display: block !important; 
            }

            #tab-home .dashboard-home { display: none !important; }
            
            /* Ocultar el header-title en PDF (ya no lo usamos) */
            #tab-home .header-title {
                display: none !important;
            }
            
            /* MOSTRAR LA PORTADA PROFESIONAL */
            #tab-home .pdf-cover {
                display: block !important;
                padding: 0 20mm !important;
            }
            #tab-home .pdf-cover-band {
                height: 4px;
                background: linear-gradient(90deg, #d4af37, #1e3a5f, #d4af37);
                margin-bottom: 20mm;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            #tab-home .pdf-cover-band.bottom {
                margin-top: 18mm;
                margin-bottom: 0;
            }
            #tab-home .pdf-cover-logos {
                display: flex !important;
                justify-content: center;
                align-items: center;
                gap: 12mm;
                margin-bottom: 10mm;
            }
            #tab-home .pdf-cover-logos img {
                height: 20mm !important;
                width: auto !important;
                max-width: 32mm !important;
                object-fit: contain;
            }
            #tab-home .pdf-cover-titles {
                text-align: center;
                margin-bottom: 12mm;
            }
            #tab-home .pdf-cover-line {
                width: 60%;
                height: 3px;
                background: #d4af37;
                margin: 0 auto 6mm;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            #tab-home .pdf-cover-line.thin {
                height: 1px;
                width: 40%;
                margin: 5mm auto;
                background: #1e3a5f;
            }
            #tab-home .pdf-cover-h1 {
                color: #1e3a5f !important;
                font-size: 16pt !important;
                font-weight: 800 !important;
                letter-spacing: 0.5px;
                margin: 0 !important;
                padding: 0 !important;
                border: none !important;
                line-height: 1.2;
                display: block !important;
            }
            #tab-home .pdf-cover-h2 {
                color: #64748b !important;
                font-size: 10pt !important;
                font-weight: 700 !important;
                letter-spacing: 3px;
                margin: 0 !important;
                padding: 0 !important;
                border: none !important;
                background: none !important;
                text-transform: uppercase;
            }
            #tab-home .pdf-cover-block {
                margin: 0 0 8mm 0;
                padding: 0;
            }
            #tab-home .pdf-cover-block-title {
                font-size: 9pt;
                font-weight: 800;
                color: #1e3a5f;
                letter-spacing: 1.5px;
                padding-bottom: 2mm;
                margin-bottom: 3mm;
                border-bottom: 2px solid #d4af37;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            #tab-home .pdf-cover-table {
                width: 100% !important;
                border-collapse: collapse !important;
                margin: 0 !important;
                box-shadow: none !important;
                border: 1px solid #cbd5e1 !important;
            }
            #tab-home .pdf-cover-table td {
                padding: 2.5mm 3mm !important;
                border: 1px solid #cbd5e1 !important;
                font-size: 9pt !important;
                vertical-align: middle !important;
            }
            #tab-home .pdf-cover-table td:nth-child(odd) {
                background: #f1f5f9 !important;
                color: #1e3a5f !important;
                font-weight: 700;
                width: 22%;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            #tab-home .pdf-cover-table td:nth-child(even) {
                background: white !important;
                color: #1e293b !important;
                width: 28%;
                font-weight: 500;
            }
            #tab-home .pdf-cover-kpis {
                display: grid !important;
                grid-template-columns: repeat(4, 1fr) !important;
                gap: 3mm !important;
            }
            #tab-home .pdf-cover-kpi {
                padding: 4mm 2mm !important;
                border-radius: 2mm;
                text-align: center;
                border: 1.5px solid #1e3a5f;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            #tab-home .pdf-cover-kpi-icon { 
                display: block; 
                margin-bottom: 2mm;
                line-height: 1;
                height: 8mm;
            }
            #tab-home .pdf-cover-kpi-icon i {
                font-size: 18pt;
                display: inline-block;
                vertical-align: middle; 
            }
            #tab-home .pdf-cover-kpi-valor { 
                font-size: 16pt !important; 
                font-weight: 800 !important; 
                display: block; 
                line-height: 1;
                margin-bottom: 1.5mm;
            }
            #tab-home .pdf-cover-kpi-label { 
                font-size: 7pt !important; 
                text-transform: uppercase; 
                letter-spacing: 0.5px; 
                font-weight: 700;
                color: #64748b;
            }
            #tab-home .pdf-cover-footer {
                text-align: center;
                font-size: 8pt;
                color: #64748b;
                font-weight: 500;
                margin-top: 6mm;
                line-height: 1.6;
            }

            /* ===== DIEZMOS: layout organizado en PDF ===== */
            .diezmos-grid-3col {
                display: block !important;
                margin-bottom: 4mm !important;
            }
            .diezmos-grid-3col > .diezmos-col {
                margin-bottom: 3mm !important;
            }
            .diezmos-grid-3col > .diezmos-col:last-child {
                margin-bottom: 0 !important;
            }
            .diezmos-grid-2col {
                display: block !important;
                margin-bottom: 4mm !important;
            }
            .diezmos-grid-2col > .diezmos-col {
                margin-bottom: 3mm !important;
            }
            .diezmos-grid-2col > .diezmos-col:last-child {
                margin-bottom: 0 !important;
            }
            .diezmos-col {
                page-break-inside: avoid !important;
                break-inside: avoid !important;
            }
            .diezmos-col .sub-titulo {
                font-size: 8.5pt !important;
                padding: 2mm 4mm !important;
                margin: 0 0 2mm 0 !important;
                background: #1e3a5f !important;
                color: white !important;
                border-radius: 2mm !important;
                border-left: 3px solid #d4af37 !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            .diezmos-mini-tabla {
                width: 100% !important;
                border-collapse: collapse !important;
                border: 1.5px solid #000 !important;
                margin: 0 !important;
            }
            .diezmos-mini-tabla td {
                border: 1px solid #94a3b8 !important;
                padding: 2mm 3mm !important;
                font-size: 8.5pt !important;
                vertical-align: middle !important;
            }
            .diezmos-mini-tabla td:first-child {
                background: #f1f5f9 !important;
                color: #1e3a5f !important;
                font-weight: 700 !important;
                width: 45% !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }
            .diezmos-mini-tabla input,
            .diezmos-mini-tabla select {
                padding: 3px 6px !important;
                font-size: 8.5pt !important;
                border: 1px solid #94a3b8 !important;
                border-radius: 0 !important;
                width: 100% !important;
            }
            .diezmos-totales-grid {
                display: grid !important;
                grid-template-columns: 1fr 1fr !important;
                gap: 3mm !important;
                margin-top: 3mm !important;
            }
            .diezmos-total-card {
                border: 1.5px solid #000 !important;
                padding: 3mm 4mm !important;
                border-radius: 2mm !important;
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
                break-inside: avoid !important;
            }
            .diezmos-total-titulo {
                font-size: 8pt !important;
            }
            .diezmos-total-valor {
                font-size: 11pt !important;
            }
    </style>