        html { scrollbar-gutter: stable; }
        body { font-family: 'Inter', sans-serif; background-color: #0b0f1a; color: #f1f5f9; }
        html.modal-open,
        body.modal-open {
            overflow: hidden !important;
            overscroll-behavior: none;
        }
        .glass-card { background: rgba(22, 30, 46, 0.8); border: 1px solid rgba(255,255,255,0.05); backdrop-filter: blur(10px); }
        .btn-filter { padding: 8px 16px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.1); }
        .btn-filter.active { background: #3b82f6; border-color: #3b82f6; color: white; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
        .btn-filter:not(.active):hover { background: rgba(255,255,255,0.05); }
        .stat-label { font-size: 0.7rem; font-weight: 700; color: #64748b; letter-spacing: 0.05em; margin-bottom: 4px; }
        .table-text { font-size: 0.75rem; }
        #modalFormulario form label { letter-spacing: 0.02em; }
        #modalFormulario textarea { min-height: 42px; }
        .line-clamp-2 {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .roadmap-main-grid {
            display: grid;
            grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
            gap: 0.75rem;
        }
        .roadmap-comments {
            color: #cbd5e1;
            font-size: 0.75rem;
            font-style: italic;
            line-height: 1.45;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }
        .roadmap-payment-methods,
        .payment-method-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
            gap: 0.5rem;
        }
        .payment-method-card {
            min-width: 0;
            padding: 0.7rem 0.8rem;
            border: 1px solid #334155;
            border-radius: 10px;
            background: rgba(15, 23, 42, 0.42);
            color: #cbd5e1;
            font-size: 0.72rem;
        }
        .payment-method-heading {
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 0.3rem 0.45rem;
            margin-bottom: 0.45rem;
        }
        .payment-method-heading strong { color: #e2e8f0; font-weight: 600; }
        .payment-method-type { font-weight: 800; }
        .payment-method-type.bank { color: #60a5fa; }
        .payment-method-type.crypto { color: #c084fc; }
        .payment-method-details {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.35rem 0.75rem;
        }
        .payment-method-details span { min-width: 0; overflow-wrap: anywhere; }
        .payment-method-details span.wide { grid-column: 1 / -1; }
        .payment-method-details b {
            display: block;
            margin-bottom: 0.1rem;
            color: #64748b;
            font-size: 0.6rem;
            text-transform: uppercase;
        }
        .payment-method-value { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
        .payment-method-empty {
            grid-column: 1 / -1;
            padding: 0.65rem;
            color: #64748b;
            font-size: 0.75rem;
            font-style: italic;
            text-align: center;
        }
        .roadmap-alter-list {
            max-height: 104px;
            overflow-y: auto;
            padding-right: 4px;
        }

        @media (min-width: 769px) and (max-height: 760px) {
            #modalFormulario form { gap: 0.65rem; padding: 1rem; }
            #modalFormulario form label { font-size: 0.68rem; margin-bottom: 0.2rem; }
            #modalFormulario input,
            #modalFormulario select,
            #modalFormulario textarea { padding-top: 0.45rem; padding-bottom: 0.45rem; }
        }
        
        #pdf-template { background: #ffffff; color: #1e293b; padding: 40px; font-family: 'Inter', sans-serif; box-sizing: border-box; }
        .pdf-header { border-bottom: 2px solid #3b82f6; padding-bottom: 20px; margin-bottom: 30px; }
        .pdf-title { color: #0b0f1a; font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -1px; }
        .pdf-title span { color: #3b82f6; }
        .pdf-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-top: 20px; }


        /* V9 Responsive layer */
        @media (max-width: 768px) {
            body { padding: 12px !important; }
            header { align-items: stretch !important; }
            header > div:first-child { text-align: center; }
            header > div:last-child {
                width: 100%;
                display: grid !important;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px !important;
            }
            header > div:last-child > div:first-child {
                grid-column: 1 / -1;
                margin-right: 0 !important;
                align-items: center !important;
            }
            header button { width: 100%; justify-content: center; min-height: 44px; }

            .btn-filter {
                flex: 1 1 calc(50% - 8px);
                text-align: center;
                padding: 10px 12px;
                font-size: 0.75rem;
            }

            input, select, textarea, button { font-size: 16px; }
            .glass-card { border-radius: 18px; }

            form.grid-cols-2,
            .grid.grid-cols-2 {
                grid-template-columns: minmax(0, 1fr) !important;
            }
            .col-span-2,
            .md\:col-span-1 {
                grid-column: span 1 / span 1 !important;
            }

            table, thead, tbody, tr, td { display: block; width: 100%; }
            thead { display: none; }
            #tablaCuerpo {
                display: grid;
                gap: 12px;
                padding: 12px;
                background: rgba(15, 23, 42, 0.35);
            }
            #tablaCuerpo tr {
                border: 1px solid rgba(148, 163, 184, 0.16);
                border-radius: 18px;
                padding: 14px;
                background: rgba(15, 23, 42, 0.72);
                box-shadow: 0 12px 32px rgba(0,0,0,0.18);
            }
            #tablaCuerpo td {
                border: 0 !important;
                padding: 8px 0 !important;
                text-align: left !important;
                white-space: normal !important;
            }
            #tablaCuerpo td::before {
                content: attr(data-label);
                display: block;
                margin-bottom: 4px;
                color: #64748b;
                font-size: 0.62rem;
                font-weight: 800;
                letter-spacing: 0.08em;
                text-transform: uppercase;
            }
            #tablaCuerpo td:first-child::before { content: "Acciones"; }
            #tablaCuerpo td:first-child > div { justify-content: flex-start !important; }
            #tablaCuerpo td:first-child button {
                min-width: 42px;
                min-height: 42px;
                border-radius: 12px;
                background: rgba(30, 41, 59, 0.9);
            }
            #tablaCuerpo td:nth-child(2)::before { content: "Orden / Cliente"; }
            #tablaCuerpo td:nth-child(3)::before { content: "Importe recibido"; }
            #tablaCuerpo td:nth-child(4)::before { content: "A entregar"; }
            #tablaCuerpo td:nth-child(5)::before { content: "Fechas"; }
            #tablaCuerpo td:nth-child(6)::before { content: "Disponibilidad"; }
            #tablaCuerpo td:nth-child(7)::before { content: "Estado"; }
            #tablaCuerpo td:nth-child(8)::before { content: "ALTER"; }
            #tablaCuerpo td:nth-child(9)::before { content: "Ganancia neta"; }

            #modalFormulario > div,
            #modalCliente > div,
            #modalDirectorio > div,
            #modalRoadmap > div,
            #modalClienteDetalle > div {
                width: 100% !important;
                max-width: 100% !important;
                max-height: 92vh !important;
                padding: 18px !important;
                border-radius: 22px !important;
            }

            #modalDirectorio .flex,
            #modalCliente .flex,
            #modalFormulario .flex {
                flex-wrap: wrap;
            }

            #roadmapContent { overflow-y: auto !important; }
            .roadmap-main-grid { grid-template-columns: minmax(0, 1fr); }
            .roadmap-payment-methods,
            .payment-method-grid { grid-template-columns: minmax(0, 1fr); }
            .roadmap-alter-list { max-height: 180px; }

            #busquedaClientes { width: 100%; }
        }

        @media (min-width: 769px) {
            #tablaCuerpo td::before { content: none; }
        }
