:root {
    --primary-color: #4a6baf;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --error-color: #dc3545;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    color: var(--text-color);
}

.elementor-invoice-maker {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.elementor-invoice-title {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0px;
}

.elementor-section-title {
    border-bottom: 1px solid gray;
    padding-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    width:100%;
}

.elementor-invoice-subtitle{
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
}

.elementor-form-group {
    margin-bottom: 1px;
    position: relative;
}

.elementor-label {
    display: none;
    margin-bottom: 5px;
    font-weight: 600;
}
.elementor-label-tb{
    margin-bottom: 5px;
    font-weight: 600;
}

.elementor-input, .elementor-select, .elementor-textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid Gray;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom:0px;
}

.elementor-input.required-field:invalid,
.elementor-select.required-field:invalid,
.elementor-textarea.required-field:invalid {
    border-color: var(--error-color);
}

.elementor-error-message {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 2px;
    display: none;
}

.elementor-textarea {
    min-height: 100px;
    resize: vertical;
}

.elementor-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

.elementor-button:hover {
    background-color: #3a5a9f;
}

.elementor-button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Item row styles */
.elementor-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: flex-wrap;
    position: relative;
}

.elementor-item-row .elementor-form-group {
    flex: 1;
    margin-bottom: 0;
}

.elementor-item-row .elementor-remove-item {
    position: absolute;
    right: -22px;
    Top: 0;
    background: none;
    border: none;
    color: #dc3545;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 5px;
    width: 25px;
}

.elementor-item-row:hover .elementor-remove-item {
    opacity: 1;
}

.elementor-add-item-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
}

.elementor-add-item-btn:hover {
    background-color: rgba(74, 107, 175, 0.1);
}

.elementor-add-item-btn i {
    font-size: 14px;
}

.elementor-currency-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.elementor-currency-selector select {
    width: auto;
    min-width: 100px;
}

.elementor-address-block {
    margin-bottom: 5px;
}

.elementor-address-line {
    display: block;
    margin-bottom: 3px;
}

.elementor-summary-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.elementor-summary-box {
    width: 300px;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.elementor-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.elementor-summary-label {
    font-weight: 600;
}

.elementor-summary-value {
    font-weight: bold;
}

.elementor-tax-details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.elementor-item-total {
    font-weight: bold;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.elementor-tax-breakdown {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.elementor-tax-rate-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 13px;
}

@media print {
    body * {
        visibility: hidden;
    }
    .elementor-preview-modal, .elementor-preview-modal * {
        visibility: visible;
    }
    .elementor-preview-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background: none;
    }
    .elementor-preview-content {
        margin: 0;
        padding: 0;
        width: 100%;
        box-shadow: none;
    }
    .elementor-preview-buttons {
        display: none;
    }
}

.elementor-two-column {
    display: flex;
    gap: 15px;
}

.elementor-two-column > div {
    flex: 1;
}

/* Logo Upload Styles */
.elementor-logo-upload {
    display: flex;
    flex-direction: column;
    align-items: left;
    margin-bottom: 1px;
}

.elementor-logo-container {
    position: relative;
    width: 150px;
    height: 150px;
    border: 2px dashed gray;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    background-color: #f9f9f9;
    padding-top: 1px;
}

.elementor-logo-container:hover {
    border-color: var(--primary-color);
}

.elementor-logo-preview {
    max-width: 150px;
    max-height: 150px;
    display: none;
}

.elementor-logo-placeholder {
    text-align: center;
    color: #777;
    padding-left: 5px;
    padding-right: 5px;
    font-size:14px;
}

.elementor-logo-placeholder i {
    font-size: 40px;
    margin-bottom: 5px;
    color: var(--primary-color);
}
.elementor-logo-placeholder-text {
    font-size:10px;
}

.elementor-logo-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
}

.elementor-logo-actions button {
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color:red;
    }

.elementor-logo-actions button:hover {
    background: #f0f0f0;
}

.elementor-logo-container.has-image .elementor-logo-placeholder {
    display: none;
}

.elementor-logo-container.has-image .elementor-logo-preview {
    display: block;
    align:left;
}

.elementor-logo-container.has-image:hover .elementor-logo-actions {
    display: flex;
}

/* Signature Upload Styles */
.elementor-signature-upload {
    margin-top: 20px;
    margin-left: auto; margin-right: 0;
}

.elementor-signature-container {
    position: relative;
    width: 150px;
    height: 80px;
    border: 2px dashed gray;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    background-color: #f9f9f9;
    margin-top: 10px;
    margin-left: auto; margin-right: 0;
    
}

.elementor-signature-container:hover {
    border-color: var(--primary-color);
}

.elementor-signature-preview {
    max-width: 100%;
    max-height: 100%;
    display: none;
    
}

.elementor-signature-placeholder {
    text-align: center;
    color: #777;
    padding: 10px;
    font-size:10px;
}

.elementor-signature-placeholder i {
    font-size: 30px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.elementor-signature-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
}

.elementor-signature-actions button {
    background: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 12px;
    color: red;
}

.elementor-signature-actions button:hover {
    background: #f0f0f0;
}

.elementor-signature-container.has-image .elementor-signature-placeholder {
    display: none;
}

.elementor-signature-container.has-image .elementor-signature-preview {
    display: block;
}

.elementor-signature-container.has-image:hover .elementor-signature-actions {
    display: flex;
}

.elementor-signature-label {
    font-weight: 600;
    margin-bottom: 1px;
    display: block;
    text-align: right;
}

.elementor-signature-text {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
    text-align: right;
}

.row {
    display: flex;
    gap: 10px;
    padding:10px;
}
.column {
    flex: 1;
    padding: 10px;
    background-color: white;
    border: 1px solid #ccc;
}

/* Address input styling */
.elementor-form-group input[type="text"] {
    margin-bottom: 0;
}

.elementor-form-group input[type="text"] + input[type="text"] {
    margin-top: 5px;
}

/* Right align numbers in input fields */
input[type="number"], .item-total {
    text-align: right;
}

/* Right align numbers in preview table */
.elementor-invoice-table td:nth-child(2),
.elementor-invoice-table td:nth-child(3),
.elementor-invoice-table td:nth-child(4),
.elementor-invoice-table td:nth-child(5) {
    text-align: right;
}

/* Saved invoices table styles */
.invoice-generator-saved-invoices {
    margin: 20px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.invoice-generator-saved-invoices h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.saved-invoices-container {
    margin-top: 20px;
}

.invoice-generator-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-generator-table th, 
.invoice-generator-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.invoice-generator-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.invoice-generator-table tr:hover {
    background-color: #f5f5f5;
}

.invoice-generator-view-btn,
.invoice-generator-download-btn,
.invoice-generator-delete-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    color: white;
}

.invoice-generator-view-btn {
    background-color: #17a2b8;
}

.invoice-generator-download-btn {
    background-color: var(--primary-color);
}

.invoice-generator-delete-btn {
    background-color: #dc3545;
}

.invoice-generator-view-btn:hover {
    background-color: #138496;
}

.invoice-generator-download-btn:hover {
    background-color: #3a5a9f;
}

.invoice-generator-delete-btn:hover {
    background-color: #c82333;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 5px;
    position: relative;
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
}

/* Invoice details in modal */
.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.invoice-items-table th, 
.invoice-items-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.invoice-items-table th {
    background-color: #f1f1f1;
}

.invoice-totals {
    margin-top: 20px;
    text-align: right;
}

.invoice-totals .total-row {
    margin-bottom: 10px;
}

.invoice-totals .total-label {
    font-weight: bold;
    display: inline-block;
    width: 150px;
}

.invoice-totals .total-value {
    display: inline-block;
    width: 150px;
    text-align: right;
}

/* Add these styles to your existing CSS */

.invoice-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.invoice-actions i {
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.invoice-actions .fa-eye {
    color: white;
}

.invoice-actions .fa-download {
    color: white;
}

.invoice-actions .fa-trash {
    color:white;
}

.invoice-actions .fa-eye:hover {
    background-color: rgba(23, 162, 184, 0.1);
}

.invoice-actions .fa-download:hover {
    background-color: rgba(74, 107, 175, 0.1);
}

.invoice-actions .fa-trash:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* ... [keep all previous CSS until .invoice-generator-table] */

.invoice-generator-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-generator-table th, 
.invoice-generator-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.invoice-generator-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.invoice-generator-table tr:hover {
    background-color: #f5f5f5;
}

.actions-column {
    width: 120px;
}

.action-icons {
    display: flex;
    gap: 12px;
}

.action-icons i {
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.action-icons i:hover {
    transform: scale(1.1);
}

.fa-eye.view-icon {
    color: #17a2b8;
}

.fa-download.download-icon {
    color: var(--primary-color);
}

.fa-trash.delete-icon {
    color: #dc3545;
}

/* ... [keep all other CSS the same] */