* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            background: white;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            max-width: 1200px;
            margin: 0 auto;
            overflow: hidden;
            animation: slideIn 0.6s ease-out;
        }

        @keyframes slideIn {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
            color: white;
            padding: 20px 25px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .header h1 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .header .nit {
            font-size: 14px;
            opacity: 0.9;
        }

        /* Content */
        .content {
            padding: 25px;
        }

        /* Primera sección: Código y Cuenta */
        .seccion-campos {
            display: flex;
            gap: 20px;
            margin-bottom: 25px;
        }

        .campo-cuenta {
            flex: 2;
        }

        /* Segunda sección: Navegación y fechas */
        .seccion-controles {
            display: flex;
            gap: 30px;
            margin-bottom: 25px;
            align-items: start;
        }

        .navegacion {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-top: 20px;
        }

        .fechas-container {
            flex: 1;
            padding: 15px;
        }

        .proyecto-container {
            min-width: 400px;
        }

        /* Botón */
        .boton-cargar {
            margin-left: 100px;    /* 🔸 mueve el botón hacia la izquierda */ 
        }

        .boton-cargar-cuenta {
            padding: 6px 12px;
            font-size: 14px;
            background-color: #2563eb;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .boton-cargar-cuenta:hover {
            background-color: #1d4ed8;
        }

        .cargar-container {
            min-width: 150px;
        }
        .fecha-grupo {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .fecha-fila {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .fecha-label {
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            min-width: 50px;
        }

        .fecha-inputs {
            display: flex;
            gap: 5px;
            align-items: center;
        }

        .fecha-numero {
            width: 45px;
            padding: 8px 6px;
            text-align: center;
            border: 2px solid #e5e7eb;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
        }

        .fecha-spinner {
            display: flex;
            flex-direction: column;
        }

        .fecha-display {
            margin-top: 5px;
            font-size: 13px;
            color: #6b7280;
            font-weight: 500;
            text-align: left;
        }

        /* Campos del formulario */
        .campo {
            display: flex;
            flex-direction: column;
        }

        .campo label {
            font-size: 13px;
            font-weight: 500;
            color: #374151;
            margin-bottom: 6px;
        }

        .campo input,
        .campo select {
            padding: 10px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .campo input:focus,
        .campo select:focus {
            outline: none;
            border-color: #4338ca;
            box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
        }

        /* Botones de navegación */
        .nav-btn {
            background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(67, 56, 202, 0.3);
        }

        .nav-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(67, 56, 202, 0.4);
        }

        .nav-btn.cuenta {
            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
            box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
        }

        .nav-btn.cuenta:hover {
            box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
        }

        /* Botón Cargar Cuenta */
        .cargar-btn {
            background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(67, 56, 202, 0.3);
            width: 100%;
            font-size: 14px;
        }

        .cargar-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(67, 56, 202, 0.4);
        }

        .cargar-btn:active {
            transform: translateY(0);
        }

        /* Tabla */
        .tabla {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
        }

        .tabla-header {
            background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
            color: white;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr 2fr 1fr 1fr;
            font-weight: 600;
            font-size: 14px;
        }

        .tabla-header div {
            padding: 15px 12px;
            text-align: center;
        }

        .tabla-body {
            background: white;
        }

        .tabla-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr 2fr 1fr 1fr;
            border-bottom: 1px solid #e5e7eb;
            transition: all 0.3s ease;
        }

        .tabla-row:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        }

        .tabla-row div {
            padding: 12px;
            display: flex;
            align-items: center;
            font-size: 13px;
        }

        .tabla-row .numero {
            justify-content: center;
            font-family: 'Courier New', monospace;
            font-weight: 600;
            color: #4338ca;
        }

        .tabla-row .fecha {
            justify-content: center;
            font-family: 'Courier New', monospace;
            font-weight: 500;
            color: #374151;
        }

        .tabla-row .tipo {
            justify-content: center;
            font-weight: 500;
            color: #374151;
        }

        .tabla-row .razon {
            justify-content: center;
            font-weight: 500;
            color: #374151;
        }

        .tabla-row .glosa {
            color: #6b7280;
        }

        .tabla-row .debe {
            justify-content: flex-end;
            font-family: 'Courier New', monospace;
            font-weight: 600;
            color: #dc2626;
        }

        .tabla-row .haber {
            justify-content: flex-end;
            font-family: 'Courier New', monospace;
            font-weight: 600;
            color: #059669;
        }

        /* Sección inferior */
        .seccion-inferior {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
            flex-wrap: wrap;
            gap: 20px;
        }

        .botones-accion {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .boton-accion {
            padding: 10px 16px;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 13px;
        }

        .pdf {
            background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
        }

        .excel {
            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
        }

        .editar {
            background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
        }

        .libro-pdf {
            background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
        }

        .libro-mayor-pdf {
            background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
        }

        .libro-mayor-excel {
            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }

        .boton-accion:hover {
            transform: translateY(-2px);
        }

        .resumen-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .totales-fila {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .saldos-fila {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .label-totales {
            font-weight: 600;
            color: #374151;
            min-width: 60px;
        }

        .diferencia {
            color: #059669;
            font-weight: 600;
            font-size: 14px;
            min-width: 120px;
        }

        .totales, .saldos {
            display: flex;
            gap: 10px;
        }

        .total, .saldo {
            width: 120px;
            padding: 10px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 6px;
            text-align: right;
            font-family: 'Courier New', monospace;
            font-weight: 600;
            font-size: 14px;
        }

        /* Responsive */
        @media (max-width: 480px) {
            body { padding: 10px; }
            .container { border-radius: 8px; }
            .header { padding: 15px 20px; text-align: center; }
            .content { padding: 20px 15px; }
            
            .seccion-campos {
                flex-direction: column;
                gap: 15px;
            }
            
            .seccion-controles {
                flex-direction: column;
                gap: 15px;
            }
            
            .navegacion {
                flex-wrap: wrap;
                gap: 5px;
            }
            
            .nav-btn {
                padding: 8px 10px;
                font-size: 12px;
            }
            
            .fecha-grupo {
                gap: 10px;
            }
            
            .fecha-inputs {
                gap: 3px;
            }
            
            .fecha-numero {
                width: 40px;
                padding: 6px 4px;
            }
            
            .tabla-header {
                grid-template-columns: 1fr;
                font-size: 12px;
            }
            
            .tabla-header div {
                padding: 12px 10px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            }
            
            .tabla-row {
                grid-template-columns: 1fr;
            }
            
            .tabla-row div {
                padding: 10px;
                border-bottom: 1px solid #f3f4f6;
                justify-content: flex-start !important;
            }
            
            .seccion-inferior {
                flex-direction: column;
                gap: 15px;
            }
            
            .botones-accion {
                flex-wrap: wrap;
                justify-content: center;
            }
            
            .boton-accion {
                padding: 8px 12px;
                font-size: 12px;
            }
            
            .resumen-container {
                width: 100%;
            }
            
            .totales-fila, .saldos-fila {
                flex-direction: column;
                gap: 10px;
            }
            
            .totales, .saldos {
                flex-direction: column;
                gap: 8px;
                width: 100%;
            }
            
            .total, .saldo {
                width: 100%;
            }
        }

        @media (min-width: 481px) and (max-width: 768px) {
            .seccion-campos {
                flex-direction: column;
            }
            
            .seccion-controles {
                flex-wrap: wrap;
            }
            
            .tabla-header {
                grid-template-columns: 1fr 1fr 1fr 1fr 1.5fr 1fr 1fr;
                font-size: 13px;
            }
            
            .tabla-row {
                grid-template-columns: 1fr 1fr 1fr 1fr 1.5fr 1fr 1fr;
            }
            
            .seccion-inferior {
                flex-direction: column;
                gap: 15px;
            }
            
            .botones-accion {
                flex-wrap: wrap;
                justify-content: center;
            }
        }

        @media (min-width: 1441px) {
            .container {
                max-width: 1400px;
            }
            
            .content {
                padding: 30px;
            }
            
            .seccion-campos, .seccion-controles {
                gap: 25px;
                margin-bottom: 30px;
            }
            
            .campo input,
            .campo select {
                padding: 12px 15px;
                font-size: 15px;
            }
            
            .nav-btn {
                padding: 10px 15px;
                font-size: 15px;
            }
            
            .boton-accion {
                padding: 12px 20px;
                font-size: 14px;
            }
            
            .tabla-header div {
                padding: 18px 15px;
                font-size: 15px;
            }
            
            .tabla-row div {
                padding: 15px;
                font-size: 14px;
            }
        }

        @media (min-width: 1921px) {
            .container {
                max-width: 1600px;
            }
            
            .content {
                padding: 40px;
            }
            
            .header {
                padding: 30px 40px;
            }
            
            .header h1 {
                font-size: 20px;
            }
            
            .campo input,
            .campo select {
                padding: 14px 18px;
                font-size: 16px;
            }
            
            .nav-btn {
                padding: 12px 18px;
                font-size: 16px;
            }
            
            .boton-accion {
                padding: 14px 24px;
                font-size: 15px;
            }
            
            .tabla-header div {
                padding: 20px 18px;
                font-size: 16px;
            }
            
            .tabla-row div {
                padding: 18px;
                font-size: 15px;
            }
            
            .total, .saldo {
                width: 140px;
                padding: 12px 15px;
                font-size: 15px;
            }
        }
    