  <style>
        * {
            font-family: 'Inter', sans-serif;
            box-sizing: border-box;
        }

        /* Invoice Theme Colors */
        :root {
            --invoice-primary: #3b82f6;
            --invoice-secondary: #1e40af;
            --invoice-accent: #dbeafe;
        }

        .theme-blue {
            --invoice-primary: #3b82f6;
            --invoice-secondary: #1e40af;
            --invoice-accent: #dbeafe;
        }

        .theme-green {
            --invoice-primary: #10b981;
            --invoice-secondary: #047857;
            --invoice-accent: #d1fae5;
        }

        .theme-red {
            --invoice-primary: #ef4444;
            --invoice-secondary: #b91c1c;
            --invoice-accent: #fee2e2;
        }

        /* A4 Size Fix for Print/PDF */
        .invoice-sheet {
            background-color: white;
            box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
            border-radius: 16px;
            border: 1px solid #e5e7eb;
            transition: all 0.3s ease;
            width: 100%;
            max-width: 21cm;
            /* A4 width */
            margin: 0 auto;
            padding: 1.5cm 1.5cm 1cm 1.5cm;
            min-height: 29.7cm;
            /* A4 height */
            position: relative;
            overflow: hidden;
        }

        /* Print specific styles - Force single page */
        @media print {
            @page {
                size: A4;
                margin: 0.5cm;
            }

            body {
                background: white;
                margin: 0;
                padding: 0;
            }

            .no-print {
                display: none !important;
            }

            .invoice-sheet {
                box-shadow: none;
                border: none;
                border-radius: 0;
                padding: 0.5cm;
                min-height: auto;
                max-width: 100%;
                page-break-inside: avoid;
                page-break-after: avoid;
                page-break-before: avoid;
                position: relative;
                background: white;
            }

            /* Ensure all content stays on one page */
            .invoice-sheet * {
                page-break-inside: avoid;
                page-break-after: avoid;
                page-break-before: avoid;
            }

            /* Hide input fields in print */
            input,
            textarea,
            select,
            button,
            .upload-box,
            .payment-tab {
                display: none !important;
            }

            /* Show static text values in print */
            .print-value {
                display: block !important;
                font-size: 10pt;
                color: #111827;
                margin-bottom: 2px;
            }

            /* Hide icons and show images */
            .fa-camera,
            .fa-cloud-upload-alt,
            .fa-pen {
                display: none !important;
            }

            /* Show images in print */
            #logoPrintImg,
            #signaturePrintImg {
                display: block !important;
                max-width: 80px;
                max-height: 60px;
            }

            /* Item rows in print */
            .print-table {
                display: table !important;
                width: 100%;
                border-collapse: collapse;
            }

            .print-table th {
                background-color: #f3f4f6 !important;
                padding: 6px !important;
                font-size: 9pt !important;
                font-weight: 600;
                text-align: left;
                border-bottom: 1px solid #d1d5db;
            }

            .print-table td {
                padding: 4px !important;
                font-size: 9pt !important;
                border-bottom: 1px solid #e5e7eb;
            }

            /* Business info in print */
            #businessName,
            #businessAddress,
            #businessPhone {
                display: block !important;
                outline: none;
            }

            /* QR code in print */
            #qrcode img,
            #qrcode canvas {
                max-width: 80px !important;
                max-height: 80px !important;
                display: inline-block !important;
            }

            /* Bill to / Ship to in print */
            .bill-to-print,
            .ship-to-print {
                display: block !important;
            }
        }

        /* PDF generation specific */
        .pdf-mode .invoice-sheet {
            padding: 1.5cm !important;
            font-size: 11pt !important;
        }

        .pdf-mode table {
            font-size: 10pt !important;
        }

        /* Print values - visible only in print */
        .print-value {
            display: none;
        }

        .upload-box {
            border: 2px dashed #e5e7eb;
            border-radius: 8px;
            padding: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #f9fafb;
        }

        .upload-box:hover {
            border-color: var(--invoice-primary);
            background: #f3f4f6;
        }

        .upload-box.drag-over {
            border-color: var(--invoice-primary);
            background: var(--invoice-accent);
        }

        .item-row {
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .btn-primary {
            background: var(--invoice-primary);
            color: white;
            padding: 8px 16px;
            border-radius: 8px;
            transition: all 0.3s ease;
            font-size: 14px;
        }

        .btn-primary:hover {
            background: var(--invoice-secondary);
            transform: translateY(-2px);
            box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
        }

        .btn-secondary {
            background: #f3f4f6;
            color: #374151;
            padding: 8px 16px;
            border-radius: 8px;
            transition: all 0.3s ease;
            font-size: 14px;
        }

        .btn-secondary:hover {
            background: #e5e7eb;
        }

        .dark-mode {
            background-color: #1f2937;
            color: #f9fafb;
        }

        .dark-mode .invoice-sheet {
            background-color: #374151;
            border-color: #4b5563;
        }

        .watermark {
            position: relative;
        }

        .watermark::after {
            content: "PAID";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-45deg);
            font-size: 80px;
            font-weight: bold;
            color: rgba(0, 0, 0, 0.1);
            pointer-events: none;
            z-index: 1;
            white-space: nowrap;
        }

        .toast-message {
            animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* QR Code Styles */
        #qrcode {
            margin-top: 5px;
        }

        #qrcode canvas,
        #qrcode img {
            max-width: 100px;
            max-height: 100px;
            border: 1px solid #e5e7eb;
            border-radius: 4px;
            padding: 4px;
        }
    </style>