
        body { background-color: #111827; color: #f3f4f6; font-family: sans-serif; margin: 0; padding: 0; }
        header { background-color: #1f2937; border-bottom: 1px solid #374151; padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
        h1 { color: #f97316; margin: 0; font-size: 20px; letter-spacing: 1px; }
        main { padding: 20px; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 20px; }
        @media (min-width: 768px) { main { grid-template-columns: 1fr 2fr; } }
        section { background-color: #1f2937; padding: 20px; border-radius: 8px; border: 1px solid #374151; }
        .full-width { grid-column: 1 / -1; }
        .space-y-4 > * + * { margin-top: 16px; }
        .input-monto { width: 100%; background-color: #111827; color: #4ade80; border: 1px solid #4b5563; padding: 10px; border-radius: 6px; font-family: monospace; font-size: 16px; font-weight: bold; box-sizing: border-box; }
        .input-key, .input-buscar { width: 100%; background-color: #111827; color: #f3f4f6; border: 1px solid #4b5563; padding: 8px 10px; border-radius: 6px; font-family: monospace; font-size: 13px; box-sizing: border-box; }
        .btn-conectar { background-color: #f97316; color: #111827; border: none; padding: 9px 16px; border-radius: 6px; font-weight: bold; font-size: 12px; cursor: pointer; text-transform: uppercase; white-space: nowrap; }
        .btn-conectar:disabled { background-color: #4b5563; color: #9ca3af; cursor: not-allowed; }
        .btn-secundario { background-color: #1f2937; color: #f3f4f6; border: 1px solid #4b5563; padding: 9px 16px; border-radius: 6px; font-weight: bold; font-size: 12px; cursor: pointer; text-transform: uppercase; white-space: nowrap; }
        .btn-secundario:disabled { color: #4b5563; cursor: not-allowed; }
        .btn-mini { background-color: #374151; color: #f3f4f6; border: none; padding: 5px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; }
        .btn-mini.quitar { background-color: #7f1d1d; }
        .grid-metricas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 20px; }
        @media (min-width: 480px) { .grid-metricas { grid-template-columns: repeat(4, 1fr); } }
        .card-metrica { background-color: #111827; padding: 12px; border-radius: 6px; border: 1px solid #374151; text-align: center; }
        .num-metrica { display: block; font-family: monospace; font-size: 14px; font-weight: bold; margin-top: 5px; }

        .contenedor-grafico { background-color: #111827; border: 1px solid #374151; border-radius: 6px; padding: 20px; margin-top: 15px; }
        .chart-container-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 160px; border-bottom: 2px solid #4b5563; padding-bottom: 5px; box-sizing: border-box; }
        .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; margin: 0 4px; }
        .bar { width: 100%; min-width: 10px; height: 50px; background-color: #3b82f6; border-top-left-radius: 3px; border-top-right-radius: 3px; transition: height 0.15s ease; }
        .bar-label { font-size: 9px; color: #9ca3af; margin-top: 8px; font-family: monospace; text-align: center; display: block; }

        .fuente-datos { font-size: 10px; color: #6b7280; margin-top: 10px; line-height: 1.5; }
        .fuente-datos b { color: #9ca3af; }
        .status-msg { font-size: 11px; margin-top: 8px; font-family: monospace; }
        .cfo-label { font-size: 10px; color: #9ca3af; text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 4px; }
        .status-ok { color: #4ade80; }
        .status-err { color: #f87171; }
        .status-wait { color: #facc15; }
        .badge-live { background-color: #052e16; color: #4ade80; }
        .badge-hist { background-color: #451a03; color: #f97316; }
        .badge { font-size: 10px; padding: 3px 8px; border-radius: 4px; font-family: monospace; }
        .metodo-toggle { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
        .metodo-btn { flex: 1; min-width: 140px; background-color: #111827; border: 1px solid #4b5563; color: #9ca3af; padding: 8px; border-radius: 6px; font-size: 11px; cursor: pointer; text-align: center; }
        .metodo-btn.activo { border-color: #f97316; color: #f97316; background-color: #451a03; }
        table.tabla-stress { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
        table.tabla-stress th, table.tabla-stress td { padding: 8px; text-align: left; border-bottom: 1px solid #374151; }
        table.tabla-stress th { color: #9ca3af; font-size: 10px; text-transform: uppercase; }
        table.tabla-stress td.negativo { color: #f87171; font-family: monospace; }
        table.tabla-stress td.positivo { color: #4ade80; font-family: monospace; }

        .resultado-busqueda { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background-color: #111827; border-radius: 6px; border: 1px solid #374151; margin-top: 6px; }
        .resultado-busqueda .info { font-size: 12px; }
        .resultado-busqueda .ticker { color: #f97316; font-weight: bold; font-family: monospace; }
        .resultado-busqueda .nombre { color: #9ca3af; font-size: 11px; }

        .fila-activo { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background-color: #111827; border-radius: 6px; border: 1px solid #374151; margin-top: 6px; }
        .fila-activo .ticker { color: #f97316; font-weight: bold; font-family: monospace; width: 60px; }
        .fila-activo .nombre { color: #9ca3af; font-size: 11px; flex: 1; }
        .fila-activo input[type=number] { width: 60px; background-color: #1f2937; color: #4ade80; border: 1px solid #4b5563; padding: 5px; border-radius: 4px; font-family: monospace; text-align: right; }

        .sum-indicador { font-family: monospace; font-size: 13px; font-weight: bold; padding: 8px 12px; border-radius: 6px; margin-top: 10px; display: flex; justify-content: space-between; align-items: center; }
        .sum-ok { background-color: #052e16; color: #4ade80; }
        .sum-mal { background-color: #451a1a; color: #f87171; }

        .grid-fundamentales { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: 15px; }
        @media (min-width: 900px) { .grid-fundamentales { grid-template-columns: 1fr 1fr; } }
        .card-empresa { background-color: #111827; border: 1px solid #374151; border-radius: 8px; padding: 15px; }
        .card-empresa h4 { margin: 0 0 4px 0; color: #f97316; font-size: 14px; }
        .card-empresa .subtitulo { color: #6b7280; font-size: 10px; margin-bottom: 10px; }
        .grupo-ratio { margin-top: 10px; }
        .grupo-ratio .titulo-grupo { font-size: 10px; text-transform: uppercase; color: #9ca3af; font-weight: bold; border-bottom: 1px solid #374151; padding-bottom: 4px; margin-bottom: 6px; }
        .fila-ratio { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
        .fila-ratio .valor { font-family: monospace; font-weight: bold; }
        .valor-bueno { color: #4ade80; }
        .valor-alerta { color: #facc15; }
        .valor-malo { color: #f87171; }

        /* --- Sección Cuenta / Perfil de Riesgo / Presupuesto --- */
        .pregunta-test { background-color: #111827; border: 1px solid #374151; border-radius: 6px; padding: 12px; }
        .pregunta-test .texto-pregunta { font-size: 13px; font-weight: bold; margin-bottom: 8px; }
        .opcion-test { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; color: #d1d5db; cursor: pointer; }
        .opcion-test input { accent-color: #f97316; cursor: pointer; }
        .perfil-box { border-radius: 6px; padding: 14px; margin-top: 14px; border: 1px solid; }
        .perfil-conservador { background-color: #0c2a45; border-color: #3b82f6; }
        .perfil-moderado { background-color: #052e16; border-color: #4ade80; }
        .perfil-arriesgado { background-color: #451a03; border-color: #f97316; }
        .perfil-agresivo { background-color: #451a1a; border-color: #f87171; }
        .perfil-nombre { font-size: 15px; font-weight: bold; margin-bottom: 4px; }
        .caja-presupuesto { border-radius: 6px; padding: 16px; border: 1px solid; }
        .caja-positiva { background-color: #052e16; border-color: #4ade80; }
        .caja-negativa { background-color: #451a1a; border-color: #f87171; }
        .balance-num { font-family: monospace; font-size: 22px; font-weight: bold; }
        .lista-sugerencias { margin: 10px 0 0 0; padding-left: 18px; font-size: 12px; color: #f3f4f6; line-height: 1.8; }
        .lista-sugerencias li { margin-bottom: 2px; }
        .cuenta-activa { background-color: #052e16; border: 1px solid #4ade80; }

        /* --- Página única: ya no hay wizard paso a paso --- */
        main > section { display: block; margin-bottom: 22px; }
        .nav-pasos, .barra-progreso { display: none !important; }

        /* --- Puerta de acceso (login de analistas) --- */
        #loginGate {
            position: fixed; inset: 0; background: #0b0f1a; z-index: 5000;
            display: flex; align-items: center; justify-content: center; padding: 20px;
        }
        #loginGate.oculto { display: none; }
        .login-box {
            background: #111827; border: 1px solid #374151; border-radius: 10px;
            padding: 34px 30px; width: 100%; max-width: 380px;
        }
        .login-box h1 { font-size: 20px; margin-bottom: 4px; }
        .login-box p { font-size: 12px; color: #9ca3af; margin-bottom: 20px; }
        .login-box label { font-size: 11px; color: #9ca3af; text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 5px; }
        .login-box input { width: 100%; margin-bottom: 14px; }
        #appContenido { display: none; }
        #appContenido.desbloqueado { display: block; }
        .barra-analista {
            display: flex; justify-content: space-between; align-items: center;
            font-size: 12px; color: #9ca3af; margin-bottom: 14px;
        }

        /* ---------- Selector de perfil (4 vías) ---------- */
        #selectorPerfil {
            position: fixed; inset: 0; background: #0b0f1a; z-index: 6000;
            display: flex; align-items: center; justify-content: center; padding: 20px;
        }
        #selectorPerfil.oculto { display: none; }
        .selector-box { width: 100%; max-width: 780px; text-align: center; }
        .selector-box h1 { font-size: 22px; margin-bottom: 6px; }
        .selector-box p { font-size: 12px; color: #9ca3af; margin-bottom: 24px; }
        .grid-perfiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
        @media (max-width: 700px) { .grid-perfiles { grid-template-columns: 1fr 1fr; } }
        .card-perfil {
            background: #111827; border: 1px solid #374151; border-radius: 10px; padding: 18px 14px;
            cursor: pointer; text-align: left; transition: border-color .15s;
        }
        .card-perfil:hover { border-color: #f97316; }
        .card-perfil .icono { font-size: 22px; margin-bottom: 8px; }
        .card-perfil h3 { font-size: 13px; margin-bottom: 6px; }
        .card-perfil p { font-size: 10.5px; color: #9ca3af; margin-bottom: 10px; line-height: 1.4; }
        .card-perfil .precio { font-size: 11px; color: #f97316; font-weight: bold; }

        /* ---------- Modal ligero para Estudiante / Persona Natural / PyME ---------- */
        .modal-ligero-overlay {
            display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 5500;
            align-items: center; justify-content: center; padding: 20px;
        }
        .modal-ligero-overlay.activo { display: flex; }
        .modal-ligero-box {
            background: #111827; border: 1px solid #374151; border-radius: 10px; padding: 28px;
            width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
        }
        .modal-ligero-box h2 { font-size: 17px; margin-bottom: 4px; }
        .modal-ligero-box p { font-size: 12px; color: #9ca3af; margin-bottom: 16px; }
        .aviso-simulado {
            font-size: 10.5px; color: #facc15; background: rgba(250,204,21,0.08);
            border: 1px solid rgba(250,204,21,0.3); padding: 8px 10px; border-radius: 6px; margin-bottom: 14px;
        }

        /* ---------- Botón flotante contextual ---------- */
        #btnFlotanteContexto {
            position: fixed; bottom: 22px; right: 22px; z-index: 4000;
            background: #f97316; color: #111827; font-weight: bold; font-size: 13px;
            padding: 14px 18px; border-radius: 30px; border: none; cursor: pointer;
            box-shadow: 0 4px 14px rgba(0,0,0,0.4); display: none; max-width: 280px; text-align: left;
        }
        #btnFlotanteContexto.visible { display: block; }
    
/* ---------- PONTE11 SaaS: selector de 2 perfiles, acceso, Evaluar Compañía ---------- */
#pantallaAcceso {
    position: fixed; inset: 0; background: #0b0f1a; z-index: 6000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
#pantallaAcceso.oculto { display: none; }
.acceso-box { width: 100%; max-width: 420px; background: #111827; border: 1px solid #374151; border-radius: 10px; padding: 30px; }
.acceso-box h1 { font-size: 22px; margin-bottom: 6px; text-align: center; }
.acceso-box p { font-size: 12px; color: #9ca3af; margin-bottom: 18px; text-align: center; }
.acceso-box label { font-size: 11px; color: #9ca3af; text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 5px; }
.acceso-box input { width: 100%; margin-bottom: 14px; }

#appContenido { display: none; }
#appContenido.desbloqueado { display: block; }
.barra-perfil {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: #9ca3af; margin-bottom: 14px;
}
.tag-perfil { font-size: 10px; text-transform: uppercase; padding: 3px 8px; border-radius: 10px; background: #1f2937; color: #f97316; margin-left: 8px; }

/* Formulario de Evaluar Compañía: grupos de cuentas contables */
.grupo-cuentas { margin-top: 16px; }
.grupo-cuentas h4 { font-size: 11px; color: #f97316; text-transform: uppercase; margin-bottom: 8px; letter-spacing: .5px; }
.grid-cuentas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .grid-cuentas { grid-template-columns: 1fr 1fr; } }
.campo-cuenta label { font-size: 10px; color: #9ca3af; display: block; margin-bottom: 4px; }

/* Dictamen de diagnóstico financiero */
.dictamen-box { border-radius: 8px; padding: 18px; margin-top: 16px; border: 1px solid; }
.dictamen-apta { background: #052e16; border-color: #4ade80; }
.dictamen-riesgo { background: #451a03; border-color: #f97316; }
.dictamen-noapta { background: #451a1a; border-color: #f87171; }
.dictamen-tag { font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.tabla-ratios { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11.5px; }
.tabla-ratios th { text-align: left; color: #9ca3af; text-transform: uppercase; font-size: 10px; padding: 6px 8px; border-bottom: 1px solid #374151; }
.tabla-ratios td { padding: 6px 8px; border-bottom: 1px solid #1f2937; }
.tabla-ratios tr:last-child td { border-bottom: none; }
.tabs-auth{display:flex;gap:8px;margin:12px 0}.auth-tab{flex:1}.auth-tab.active{outline:2px solid #f97316}.selection-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px}.selection-card{border:1px solid #374151;background:#111827;color:#fff;border-radius:10px;padding:18px;text-align:left;cursor:pointer;min-height:150px}.selection-card:hover{border-color:#f97316;transform:translateY(-1px)}.selection-card span{font-size:28px;display:block;margin-bottom:10px}.selection-card b{display:block;font-size:15px}.selection-card small{display:block;color:#9ca3af;margin-top:8px;line-height:1.5}.choice-panel{margin-top:14px;padding:16px;border:1px solid #374151;border-radius:8px;background:#0f172a}.choice-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.governance-note{margin-top:12px;padding:10px;border-left:3px solid #f97316;background:#111827;color:#9ca3af;font-size:11px;line-height:1.5}@media(max-width:800px){.selection-grid{grid-template-columns:1fr}}

/* PONTE11 Financial Intelligence Phase 3 */
.fi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.fi-card{border:1px solid #374151;border-radius:12px;padding:12px;background:rgba(17,24,39,.7);display:flex;flex-direction:column;gap:4px}.fi-card small{color:#9ca3af}.fi-card strong{font-size:22px}.fi-card span{font-weight:700}.fi-card em{font-style:normal;font-size:11px;color:#9ca3af}.exposure-range{display:flex;flex-direction:column;gap:4px;margin:12px 0}.exposure-range strong{font-size:22px}@media(max-width:900px){.fi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:540px){.fi-grid{grid-template-columns:1fr}}

.ci-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.corporate-intelligence{margin-top:16px;padding-top:12px;border-top:1px solid #374151}.corporate-intelligence h3{margin:0 0 10px}@media(max-width:760px){.ci-grid{grid-template-columns:1fr}}

/* PONTE11 Competitive Advantage Phase 6 */
.ca-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}.ca-panel{background:#0f172a;border:1px solid #374151;border-radius:12px;padding:14px;min-width:0}.ca-panel h3{margin:0 0 10px;color:#f97316}.ca-panel label{font-size:10px;color:#9ca3af;display:block;margin:6px 0}.ca-result{white-space:pre-wrap;overflow:auto;max-height:320px;background:#080d18;border:1px solid #1f2937;border-radius:8px;padding:10px;font-size:10px;color:#cbd5e1}.ca-alert{border-left:4px solid #f97316;background:#111827;padding:10px;margin-top:8px;border-radius:6px}.ca-alert p{margin:4px 0;color:#d1d5db}.ca-alert small{color:#6b7280}@media(max-width:900px){.ca-grid{grid-template-columns:1fr}}

/* PONTE11 Academic Pilot Ready v4.1 */
.academic-panel{margin-top:14px;padding:16px;border:1px solid #374151;border-radius:10px;background:#0f172a}.academic-panel h3,.academic-panel h4{margin:0 0 10px;color:#f97316}.academic-privacy-text{font-size:12px;color:#d1d5db;line-height:1.6}.academic-privacy-text ul{padding-left:18px}.academic-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.academic-tab-panel{border-top:1px solid #374151;padding-top:14px}.academic-question{padding:12px 0;border-bottom:1px solid #1f2937}.academic-question b{display:block;margin-bottom:8px}.academic-question label{display:block;padding:5px 0;color:#d1d5db;font-size:12px}.academic-company-slot{border:1px solid #374151;border-radius:10px;padding:14px;margin:12px 0;background:#111827}.academic-case-card{border:1px solid #374151;border-radius:10px;padding:14px;margin:10px 0;background:#111827}.academic-case-card h4{margin:0 0 6px;color:#f97316}.academic-case-card p{white-space:pre-wrap;color:#d1d5db}.academic-submission{border-top:1px solid #374151;margin-top:10px;padding-top:10px}.academic-dashboard{margin-top:12px}.muted{color:#9ca3af;font-size:11px}.project-year-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;grid-column:1/-1;border-bottom:1px solid #1f2937;padding-bottom:8px}.correlation-heatmap{overflow:auto}.correlation-table{border-collapse:separate;border-spacing:3px;font-size:11px}.correlation-table th,.correlation-table td{min-width:58px;text-align:center;padding:7px;border-radius:4px}.correlation-table th{color:#9ca3af;background:#111827}.correlation-table td{background:rgba(249,115,22,calc(.12 + var(--corr-strength)*.55));color:#fff}.correlation-table td.corr-negative{background:rgba(96,165,250,calc(.12 + var(--corr-strength)*.55))}.sensitivity-matrix td{text-align:right;font-family:monospace}.sensitivity-cell.positive{background:rgba(74,222,128,.10)}.sensitivity-cell.negative{background:rgba(248,113,113,.12)}.table-scroll{overflow-x:auto}.tornado-row{display:grid;grid-template-columns:140px 1fr 190px;gap:10px;align-items:center;margin:8px 0;font-size:11px}.tornado-track{height:14px;background:#1f2937;border-radius:20px;overflow:hidden}.tornado-bar{height:100%;background:linear-gradient(90deg,#b91c1c,#f97316,#facc15);border-radius:20px}.tornado-row small{text-align:right;color:#9ca3af;font-family:monospace}@media(max-width:800px){.project-year-row{grid-template-columns:1fr}.tornado-row{grid-template-columns:1fr}.tornado-row small{text-align:left}}
