:root {
            --primary-color: #2c7da0;
            --secondary-color: #a9d6e5;
            --accent-color: #01497c;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --invoice-color: #3a86ff;
            --calc-color: #e83e8c;
        }
        .page-header {
            background: linear-gradient(135deg, rgba(169, 214, 229, 0.4) 0%, rgba(44, 125, 160, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(44, 125, 160, 0.2);
            position: relative;
            overflow: hidden;    color: var(--text-color);
        }
        .breadcrumb {
            background-color: transparent;
            padding: 0.5rem 0;
            margin-bottom: 0.5rem;
        }
        .breadcrumb-item a {
            color: var(--text-muted);
            text-decoration: none;
        }
        .breadcrumb-item.active {
            color: var(--text-color);
        }
        .form-control.error {
            border-color: var(--danger-color);
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
        }
        .error-message {
            color: var(--danger-color);
            font-size: 0.875rem;
            margin-top: 0.25rem;
            display: none;
        }
        .btn-success {
            background-color: var(--success-color);
            border-color: var(--success-color);
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            transition: all 0.3s;
        }
        .invoice-preview-container {
            background-color: white;
            border-radius: 8px;
            padding: 2rem;
            margin-top: 2rem;
            border: 1px solid var(--border-color);
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            position: relative;
        }
        .invoice-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 2px solid var(--primary-color);
        }
        .invoice-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }
        .invoice-logo-container {
            margin-bottom: 1rem;
            text-align: center;
        }
        .invoice-logo {
            max-height: 80px;
            max-width: 200px;
            object-fit: contain;
        }
        .company-info, .client-info {
            margin-bottom: 2rem;
        }
        .info-label {
            font-weight: 600;
            color: var(--text-muted);
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }
        .info-value {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }
        .invoice-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1.5rem 0;
        }
        .invoice-table th {
            background-color: var(--light-gray);
            padding: 1rem;
            text-align: left;
            font-weight: 600;
            border: 1px solid var(--border-color);
        }
        .invoice-table td {
            padding: 1rem;
            border: 1px solid var(--border-color);
        }
        .text-right {
            text-align: right;
        }
        .text-center {
            text-align: center;
        }
        .totals-section {
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 2px solid var(--border-color);
        }
        .total-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            font-size: 1.1rem;
        }
        .total-label {
            font-weight: 600;
        }
        .grand-total {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
            padding-top: 1rem;
            border-top: 2px solid var(--border-color);
            margin-top: 1rem;
        }
        .invoice-footer {
            margin-top: 3rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--border-color);
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        .invoice-actions {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 2rem;
            flex-wrap: wrap;
        }
        .template-options {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        .template-option {
            flex: 1;
            min-width: 150px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        .template-option:hover {
            border-color: var(--primary-color);
            transform: translateY(-3px);
        }
        .template-option.active {
            border-color: var(--primary-color);
            background-color: rgba(44, 125, 160, 0.05);
        }
        .template-name {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--primary-color);
        }
        .template-desc {
            font-size: 0.9rem;
            color: var(--text-muted);
        }
        .item-row {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
            align-items: center;
        }
        .item-description {
            flex: 3;
        }
        .item-quantity, .item-price, .item-total {
            flex: 1;
        }
        .item-actions {
            flex: 0.5;
        }
        .delete-item {
            color: var(--danger-color);
            cursor: pointer;
            font-size: 1.2rem;
        }
        @media (max-width: 768px) {
            .invoice-header {
                flex-direction: column;
                gap: 1rem;
            }
            .invoice-actions {
                flex-direction: column;
            }
            .item-row {
                flex-wrap: wrap;
            }
            .item-description, .item-quantity, .item-price, .item-total {
                flex: 100%;
                margin-bottom: 0.5rem;
            }
        }
        .color-options {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        .color-option {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid transparent;
        }
        .color-option.active {
            border-color: #333;
        }
        .currency-selector {
            max-width: 200px;
        }
        .logo-upload-container {
            margin-bottom: 1.5rem;
        }
        .logo-preview {
            width: 150px;
            height: 80px;
            border: 1px dashed var(--border-color);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 0.5rem;
            background-color: var(--light-gray);
            overflow: hidden;
        }
        .logo-preview img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        .logo-upload-btn {
            margin-top: 0.5rem;
        }
        .history-panel {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 1rem;
            background-color: white;
        }
        .history-item {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .history-item:hover {
            background-color: var(--light-gray);
        }
        .history-item:last-child {
            border-bottom: none;
        }
        .history-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        .history-details {
            display: flex;
            justify-content: space-between;
            font-size: 0.875rem;
            color: var(--text-muted);
        }
        .tax-type-selector {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        .tax-type-option {
            flex: 1;
            padding: 0.5rem;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        .tax-type-option.active {
            border-color: var(--primary-color);
            background-color: rgba(44, 125, 160, 0.1);
            color: var(--primary-color);
            font-weight: 600;
        }
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            display: none;
        }
        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 5px solid var(--light-gray);
            border-top: 5px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .shortcut-hint {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.75rem;
            color: var(--text-muted);
            background-color: var(--light-gray);
            padding: 2px 6px;
            border-radius: 4px;
        }
        .date-input-group {
            position: relative;
        }
        .template-preview-container {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }
        .template-preview-item {
            flex: 1;
            min-width: 200px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.3s;
        }
        .template-preview-item.active {
            border-color: var(--primary-color);
            background-color: rgba(44, 125, 160, 0.05);
        }
        .template-preview-thumbnail {
            width: 100%;
            height: 120px;
            background-color: var(--light-gray);
            border-radius: 4px;
            margin-bottom: 0.5rem;
            overflow: hidden;
        }
        .ad-container.mt-4 .tax-section {
            background-color: rgba(44, 125, 160, 0.05);
            padding: 1rem;
            border-radius: 6px;
            margin-bottom: 1rem;
            border-left: 3px solid var(--primary-color);
        }
        .modal-content {
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }
        .modal-header {
            border-bottom: 1px solid var(--border-color);
        }
        .modal-footer {
            border-top: 1px solid var(--border-color);
        }
                        .invoice-header {
                            display: flex;
                            justify-content: space-between;
                            margin-bottom: 30px;
                            padding-bottom: 15px;
                            border-bottom: 2px solid ${currentColor};
                        }
                        .invoice-title {
                            font-size: 28px;
                            font-weight: bold;
                            color: ${currentColor};
                            margin-bottom: 5px;
                        }
                        .invoice-logo-container {
                            margin-bottom: 15px;
                        }
                        .invoice-logo {
                            max-height: 60px;
                            max-width: 180px;
                        }
                        .company-info, .client-info {
                            margin-bottom: 20px;
                        }
                        .info-label {
                            font-weight: bold;
                            color: #666;
                            font-size: 14px;
                            margin-bottom: 5px;
                        }
                        .invoice-table {
                            width: 100%;
                            border-collapse: collapse;
                            margin: 20px 0;
                        }
                        .invoice-table th, .invoice-table td {
                            border: 1px solid #ddd;
                            padding: 10px;
                        }
                        .invoice-table th {
                            background-color: #f5f5f5;
                            font-weight: bold;
                        }
                        .totals-section {
                            margin-top: 30px;
                            text-align: right;
                        }
                        .total-row {
                            display: flex;
                            justify-content: space-between;
                            margin-bottom: 10px;
                        }
                        .grand-total {
                            font-size: 18px;
                            font-weight: bold;
                            border-top: 2px solid #ddd;
                            padding-top: 10px;
                            color: ${currentColor};
                        }
                        .invoice-footer {
                            margin-top: 30px;
                            padding-top: 15px;
                            border-top: 1px solid #ddd;
                            color: #666;
                            font-size: 14px;
                        }
                        @media print {
                            .no-print { display: none; }
                            @page { margin: 0.5cm; }
                        }