/* Quotation Maker Styles - Professional Version */
* {
    box-sizing: border-box;
}

.quotation-maker-wrapper {
    background: #F6F9FC;
    min-height: 100vh;
    padding: 60px 0;
    position: relative;
}

.quotation-maker-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

/* .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
} */

/* .quotation-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quotation-title {
    color: #1a202c;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.quotation-header p {
    color: #718096;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
} */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Layout */
.quotation-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.quotation-card {
    background: #F7FBFF;
    border-radius: 10px;
    padding: 50px 30px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    border: 1px solid #8EBFFF;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
}

.quotation-card::before {
    display: none;
}

.quotation-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quotation-card.full-width {
    grid-column: 1 / -1;
}

.card-title {
    color: #1A2E47;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 30px;
    display: flex;
    align-items: center;
    gap: 5px;
    /* padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0; */
}
.logo-upload .card-title{justify-content: center;}

.card-title::before {
    display: none;
}

.subtitle {
    font-size: 16px;
    color: #606060;
    font-weight: 400;
}

/* Form Elements */
.form-group {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    color: #1A2E47;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 16px;
    /* letter-spacing: 0.3px; */
}

.form-group input,
.form-group select,
.form-group textarea, .form-group.extra-field input,
.form-group.extra-field select,
.form-group.extra-field textarea {
    width: 100%;
    padding: 20px 22px;
    border: 1px solid #D1D1D1;
    border-radius: 6px;
    font-size: 16px;
    background: #ffffff;
    color: #606060;
    transition: all 0.2s ease;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover,
.form-group.extra-field input:hover,
.form-group.extra-field select:hover,
.form-group.extra-field textarea:hover  {
    border-color: #9ca3af;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group.extra-field input:focus,
.form-group.extra-field select:focus,
.form-group.extra-field textarea:focus {
    outline: none;
    border-color: #1773EA;
    /* box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); */
    background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.form-group.extra-field input::placeholder,
.form-group.extra-field textarea::placeholder {
    color: #606060;
}

.quotation-card .form-group.extra-field{
    background: unset !important;
    border: unset !important;
    padding: unset !important;
}
.quotation-card button.remove-extra-field{
    font-size: 14px;
    top: 0px !important;
    right: 0px !important;
    width: 22px !important;
    height: 22px !important;
}

.form-group input.error {
    border-color: #f56565;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Contact Input */
.contact-input {
    display: flex;
    gap: 8px;
}

.contact-input .country-code {
    flex: 0 0 auto;
    width: auto;
    background: #ffffff;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    padding: 10px 8px;
    font-size: 0.9rem;
}

.contact-input .country-code:focus {
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
    outline: none;
}

.contact-input input {
    flex: 1;
}

/* Logo Upload */
.logo-upload {
    text-align: center;
    padding: 20px;
}

.upload-icon {
    /* font-size: 2.5rem; */
    margin-bottom: 20px;
    /* opacity: 0.5; */
    display: inline-block;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-info {
    color: #606060;
    font-size: 16px;
    margin: 0 0 30px;
    line-height: 1.6;
}

.drop-zone {
    border: 2px dashed #d2d6dc;
    border-radius: 6px;
    padding: 52px 20px;
    text-align: center;
    background: #FBFDFF;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
    position: relative;
    overflow: visible;
}

.drop-zone::before {
    display: none;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #1773EA;
    background: #F7FBFF;
    color: #1773EA;
}

.drop-zone span {
    position: relative;
    z-index: 1;
    font-weight: 400;
    font-size: 16px;
    color: #606060;
}

.drop-zone:hover span {
    color: #1773EA;
}

/* Buttons */
.add-more-btn,
.add-custom-btn,
.add-description-btn,
.add-field-btn,
.toggle-description-btn,.show-words-btn {
    background: unset;
    color: #1A2E47;
    border: none;
    font-size: 16px;
    font-weight: 400;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: relative;
    transition: all 0.2s ease;
    /* border-radius: 6px; */
    /* margin-top: 12px; */
    /* box-shadow: none; */
    /* overflow: visible; */
}

.add-more-btn::before,
.add-custom-btn::before,
.add-description-btn::before,
.add-field-btn::before,
.toggle-description-btn::before {
    display: none;
}

/* .add-more-btn:hover,
.add-custom-btn:hover,
.add-description-btn:hover,
.add-field-btn:hover,
.toggle-description-btn:hover {
    background: #2563eb;
} */

/* .add-more-btn:active,
.add-custom-btn:active,
.add-description-btn:active,
.add-field-btn:active,
.toggle-description-btn:active {
    background: #1d4ed8;
} */

.add-more-btn .icon,
.add-custom-btn .icon,
.add-description-btn .icon,
.add-field-btn .icon,
.toggle-description-btn .icon {
    font-size: 18px;
    /* font-weight: bold; */
    position: relative;
    z-index: 1;
    padding: 1px 6px;
    border-radius: 5px;
    border: 1px solid #D1D1D1;
    line-height: normal;
}

/* GST Checkbox */
.gst-checkbox {
    margin: 20px 0;
    padding: 20px;
    background: #F7FBFF;
    border-radius: 8px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    border: 1px solid #8EBFFF;
    transition: all 0.2s ease;
}

.gst-checkbox:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gst-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #1A2E47;
    font-size: 16px;
    margin: 0;
}

.gst-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #3b82f6;
    cursor: pointer;
    border: 1px solid #D1D1D1;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.gst-checkbox input[type="checkbox"]:checked {
    transform: scale(1.05);
}

.gst-checkbox input[type="checkbox"]:hover {
    transform: scale(1.02);
}
.gst-checkbox input[type=checkbox]:focus, .checkbox-row input[type=checkbox]:focus {
    outline-offset: unset;
    outline: unset;
}
.gst-checkbox input[type=checkbox]:after{
    left: 5px;
    top: 2px;
    width: 7px;
    height: 11px;
    border: 2px solid #1A2E47;
    border-top: 0;
    border-left: 0;
    transform: rotate(40deg);
}

/* GST Percentage Container */
.gst-percentage-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #d2d6dc;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gst-percentage-container .gst-field label {
    display: block;
    color: #1A2E47;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 16px;
}

.gst-percentage-container .gst-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.gst-percentage-container .gst-field.split-tax input {
    background: #F7FBFF;
}

.gst-percentage-container .gst-field input:focus {
    outline: none;
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
}

/* Product Cell Styling */
.product-cell {
    width: 40%;
}

.product-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Product Meta (Unit) */
.product-meta {
    margin-top: 8px;
    padding: 8px;
    background: #f0f9ff;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
}

.product-unit-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
}

.product-unit-input:focus {
    outline: none;
    border-color: #1773EA;
    /* box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); */
}

/* Product Description Textarea */
.product-description {
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    padding: 8px 12px;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    font-size: 0.875rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.product-description:focus {
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
    outline: none;
}

/* Product Extra Fields */
.product-extra-fields {
    margin-top: 8px;
}

.product-extra-field {
    padding: 12px;
    padding-right: 40px;
    background: #F7FBFF !important;
    border: 1px solid #D1D1D1 !important;
    border-radius: 5px;
    margin-bottom: 0px;
    position: relative;
}

.product-extra-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D1D1;
    border-radius: 5px;
    font-size: 15px;
    background: white;
    margin-bottom: 8px;
    color: #606060;
}

.product-extra-field input:last-of-type {
    margin-bottom: 0;
}

.product-extra-field .remove-extra {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.product-extra-field .remove-extra:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

/* Unit Select */
.unit-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s ease;
}

.unit-select:focus {
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
    outline: none;
}

.unit-select:hover {
    border-color: #9ca3af;
}

/* Invoice Table */
.invoice-table {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #D1D1D1;
}

#invoice-table {
    width: 100%;
    border-collapse: separate;
    margin-bottom: 0;
    font-size: 16px;
}

#invoice-table-body {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.invoice-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.invoice-table th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 2px solid #e5e7eb;
}

.invoice-table th:first-child {
    border-top-left-radius: 6px;
}

.invoice-table th:last-child {
    border-top-right-radius: 6px;
}

.invoice-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    background: white;
    transition: background 0.2s ease;
}

.invoice-table tr:hover td {
    background: #f7fafc;
}

.invoice-table tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.invoice-table tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.invoice-table input {
    border: 1px solid #d2d6dc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    width: 100%;
    transition: all 0.2s ease;
}

.invoice-table input:hover {
    border-color: #9ca3af;
}

.invoice-table input:focus {
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
    outline: none;
}

.total-amount {
    font-weight: 600;
    color: #1a202c;
    font-size: 1rem;
}

.action-btn {
    background: #f9fafb;
    border: 1px solid #d2d6dc;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 1rem;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f3f4f6;
}

/* .delete-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.copy-btn:hover {
    background: #f0fdf4;
    border-color: #86efac;
    color: #16a34a;
} */

/* Row Controls - Per Product */
.row-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    flex-wrap: wrap;
}

.row-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.row-control-item label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
}

.row-unit-select {
    padding: 6px 10px;
    border: 1px solid #d2d6dc;
    border-radius: 4px;
    background: white;
    font-size: 0.85rem;
    min-width: 100px;
    transition: all 0.2s ease;
}

.row-unit-select:focus {
    outline: none;
    border-color: #1773EA;
    /* box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); */
}

.row-unit-select:hover {
    border-color: #9ca3af;
}

.row-control-btn {
    padding: 6px 12px;
    background: white;
    color: #374151;
    border: 1px solid #d2d6dc;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.row-control-btn:hover {
    background: #f0f9ff;
    border-color: #1773EA;
    color: #1773EA;
}

.row-control-btn .icon {
    font-size: 0.85rem;
}

/* Product Options (Legacy support) */
.product-options {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.add-unit {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

.add-line-btn {
    border: 1px dashed #8EBFFF;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #F7FBFF;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 400;
    color: #606060;
    font-size: 16px;
    position: relative;
    overflow: visible;
    margin-top: 40px;
}

.add-line-btn::before {
    display: none;
}

.add-line-btn:hover {
    border-color: #1773EA;
    color: #1773EA;
    background: #f0f9ff;
}

.add-line-btn .icon {
    font-size: 16px;
    position: relative;
    z-index: 1;
    padding: 0px 6px;
    border-radius: 5px;
    line-height: normal;
    border: 1px solid var(--qt-border);
}

.add-line-btn span:last-child {
    position: relative;
    z-index: 1;
}

/* Additional Options */
.additional-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.option-box {
    border: 1px dashed #606060;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 400;
    color: #606060;
    font-size: 16px;
    position: relative;
    overflow: visible;
    width: fit-content;
}

.option-box::before {
    display: none;
}

.option-box:hover {
    border-color: #1773EA;
    color: #1773EA;
    background: #f0f9ff;
}

.option-box.has-content {
    border-style: solid;
    border-color: #10b981;
    background: #f0fdf4;
    color: #059669;
}

.option-box.has-content::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.option-box .icon {
    font-size: 16px;
    position: relative;
    z-index: 1;
    padding: 0px 6px;
    border-radius: 5px;
    line-height: normal;
    border: 1px solid var(--qt-border);
}

.option-box:hover .icon, .add-line-btn:hover .icon{
    border-color: #1773EA;
}

.option-box span:last-child {
    position: relative;
    z-index: 1;
}

/* Amount Summary */
/* .amount-summary {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 0;
} */

.amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-size: 20px;
    transition: all 0.2s ease;
}
.amount-row span{
    font-size: 20px;
    font-weight: 400;
}

.amount-row:hover {
    background: transparent;
}

/* .amount-row span:first-child {
    color: #374151;
    font-weight: 500;
} */

/* .amount-row span:last-child {
    color: #1a202c;
    font-weight: 600;
} */

.amount-row.total {
    border-top: 1px solid #D1D1D1;
    border-bottom: 1px solid #D1D1D1;
    background: unset;
    border-radius: 0;
    box-shadow: none;
    padding: 30px 0;
}

.amount-row.total span {
    font-size: 24px;
    font-weight: 600;
    color: #1A2E47;
}

.amount-row.gst-row {
    color: #059669;
    font-weight: 500;
    padding: 12px 0;
}

.amount-row.gst-row span:first-child {
    color: #059669;
}

.amount-row.gst-row span:last-child {
    color: #059669;
    font-weight: 600;
}

.add-discount-btn {
    background: none;
    border: none;
    color: #1A2E47;
    cursor: pointer;
    padding: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 20px 0;
    transition: color 0.2s ease;
    font-weight: 400;
}

.add-discount-btn:hover {
    color: #1773EA;
}

.checkbox-row {
    margin: 15px 0;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    font-size: 16px;
    color: #1A2E47;
}
.checkbox-row input[type=checkbox], .rounding-options input[type=radio]{
    width: 20px;
    height: 20px;
    accent-color: #3b82f6;
    cursor: pointer;
    border: 1px solid #D1D1D1;
    border-radius: 6px;
    transition: transform 0.2s ease;
}
.checkbox-row input[type=checkbox]:after, .rounding-options input[type=radio]:after{
    left: 5px;
    top: 2px;
    width: 7px;
    height: 11px;
    border: 2px solid #1A2E47;
    border-top: 0;
    border-left: 0;
    transform: rotate(40deg);
    border-radius: 0;
    background: unset;
}

.rounding-options {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.rounding-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 16px;
}

.summary-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: space-around;
}

.summary-buttons button{
    color: #1A2E47;
}

.show-words-btn .icon{
    font-size: 15px;
    position: relative;
    z-index: 1;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid #D1D1D1;
    line-height: normal;
}

.extra-summary-field {
    background: #F7FBFF !important;
    border: 1px solid #D1D1D1 !important;
}

/* Generate Quote Button */
.generate-quote-section {
    text-align: center;
    margin-top: 30px;
    padding: 30px 0;
}

.form-error-summary {
    display: none;
    text-align: left;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    color: #B91C1C;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.08);
}

.form-error-summary__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 14px;
}

.form-error-summary__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #DC2626;
    color: #fff;
    font-weight: 700;
}

.form-error-summary__list {
    margin: 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 16px;
    line-height: 1.6;
}

.form-error-summary__list li {
    cursor: pointer;
}

.form-error-summary__list li:hover {
    text-decoration: underline;
}

.error-text {
    color: #DC2626;
    font-size: 0.85rem;
    display: block;
    margin-top: 6px;
}

.generate-quote-btn {
    background: #1773EA;
    color: white;
    border: none;
    padding: 14px 48px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #1773EA;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.generate-quote-btn::before {
    display: none;
}

.generate-quote-btn:hover {
    color: #1773EA;
    background: transparent;
    border: 1px solid #1773EA;
    box-shadow: unset;
}

.generate-quote-btn:active {
    background: #1773EA;
}

.generate-quote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.generate-quote-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    border: 1px solid #e5e7eb;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-content textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.modal-content textarea:focus {
    outline: none;
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: normal;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close:hover {
    color: #374151;
    background: #f3f4f6;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.modal-buttons button {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    margin: 0;
}

.save-btn {
    background: #1773EA;
    color: white;
    box-shadow: none;
    border: 1px solid #1773EA !important;
    width: fit-content;
}

.save-btn:hover {
    color: #1773EA;
    background: transparent;
    border: 1px solid #1773EA;
}

.cancel-btn {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d2d6dc;
}

.cancel-btn:hover {
    background: #f3f4f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quotation-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quotation-title {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .additional-options {
        grid-template-columns: 1fr;
    }
    
    .summary-buttons {
        flex-direction: column;
    }
    
    .invoice-table {
        font-size: 0.9rem;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 8px 6px;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .quotation-card {
        padding: 20px;
    }
    
    .quotation-title {
        font-size: 1.8rem;
    }
    
    .generate-quote-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

/* Animation for form interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quotation popup */
.quotation-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.quotation-popup-content {
    background: #ffffff;
    border-radius: 12px;
    width: 520px;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
}

.quotation-popup-header {
    background: #1773ea;
    background-image: url(/wp-content/uploads/2025/08/pricing-popup-bg.png);
    background-size: cover;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quotation-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
}

.quotation-popup-close {
    background: none;
    border: 0;
    color: #00000055;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.quotation-popup-close:hover,
.quotation-popup-close:focus {
    color: #000000dd;
}

.quotation-popup-body {
    padding: 24px 24px 28px;
}

.quotation-popup-desc {
    font-size: 16px;
    color: #656565;
    line-height: 22px;
    margin: 0 0 24px;
}

.quotation-popup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quotation-popup-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.quotation-popup-field {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    font-size: 16px;
    color: #1a2e47;
}

.quotation-popup-field input {
    width: 100%;
    padding: 16px;
    margin-top: 12px;
    border-radius: 6px;
    border: 1px solid #d1d1d1;
    color: #606060;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quotation-popup-field input:focus {
    border-color: #1773ea;
    outline: none;
    box-shadow: 0 0 0 1px rgba(23, 115, 234, 0.15);
}

.quotation-popup-field input.error {
    border-color: #dc2626;
}

.required-indicator {
    color: #dc2626;
    font-weight: 600;
}

.quotation-popup-btn {
    background: #1773ea;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quotation-popup-btn:hover,
.quotation-popup-btn:focus {
    background: #0f5ec2;
    box-shadow: 0 10px 20px rgba(23, 115, 234, 0.25);
    transform: translateY(-1px);
}

.quotation-popup-message {
    min-height: 18px;
    font-size: 15px;
    font-weight: 500;
    color: #1a2e47;
}

.quotation-popup-message.error {
    color: #dc2626;
}

.quotation-popup-message.success {
    color: #047857;
}

@media (max-width: 640px) {
    .quotation-popup-content {
        width: 100%;
    }

    .quotation-popup-form-grid {
        grid-template-columns: 1fr;
    }
}

.quotation-card {
    animation: fadeInUp 0.6s ease-out;
}

.quotation-card:nth-child(1) { animation-delay: 0.1s; }
.quotation-card:nth-child(2) { animation-delay: 0.2s; }
.quotation-card:nth-child(3) { animation-delay: 0.3s; }
.quotation-card:nth-child(4) { animation-delay: 0.4s; }

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1773EA;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error states */
.success-message,
.error-message,
.info-message {
    padding: 18px 24px;
    border-radius: 12px;
    margin: 25px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.4s ease, fadeOut 0.3s ease 4.7s forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.success-message::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.error-message::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.info-message {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.info-message::before {
    content: 'i';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #17a2b8;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Pulse Effect for Amount Updates */
.pulse-effect {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    }
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 99999;
    transition: width 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
    white-space: nowrap;
}

.tooltip.show {
    opacity: 1;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #1773EA;
    border-radius: 6px;
    border: 2px solid #f3f4f6;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Custom Fields */
.custom-field-row {
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    position: relative;
    transition: all 0.2s ease;
}

.custom-field-row:hover {
    border-color: #d2d6dc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.custom-field-row .form-row {
    margin-bottom: 0;
}

.custom-field-row .remove-custom-field {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fc8181;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(252, 129, 129, 0.3);
}

.custom-field-row .remove-custom-field:hover {
    background: #f56565;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.5);
}

/* Charge Rows */
.charge-row {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.charge-row:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-color: #cbd5e0;
}

.charge-row.discount {
    border-left: 4px solid #fc8181;
}

.charge-row.additional {
    border-left: 4px solid #48bb78;
}

.charge-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.charge-amount {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.charge-row.discount .charge-calculated {
    color: #fc8181;
}

.charge-row.additional .charge-calculated {
    color: #48bb78;
}

.remove-charge {
    background: #fc8181;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.remove-charge:hover {
    background: #f56565;
    transform: scale(1.1);
}

/* Discount Modal Specific Styles */
#discount-modal .discount-form {
    margin: 15px 0;
}

#discount-modal .form-group {
    margin-bottom: 16px;
}

#discount-modal select,
#discount-modal input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

#discount-modal select:focus,
#discount-modal input:focus {
    outline: none;
    border-color: #1773EA;
    /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
}

/* ========== NEW QUOTATION TABLE STYLES ========== */
:root {
    --qt-border: #D1D1D1;
    --qt-head: #eef6ff;
    --qt-text: #1f2a37;
    --qt-muted: #6b7280;
    --qt-primary: #1773EA;
    --qt-radius: 14px;
}

.qt {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #D1D1D1;
    border-radius: 14px;
    overflow: hidden;
    color: #606060;
}

.qt thead th {
    background: #F1F7FF;
    text-align: left;
    padding: 16px 20px;
    font-weight: 600;
    color: #1A2E47;
    border: unset;
    border-bottom: 1px solid var(--qt-border);
    border-right: 1px solid var(--qt-border);
}

.qt tbody td {
    padding: 16px 20px;
    vertical-align: top;
    background: #fff;
    border: unset;
    border-bottom: 1px solid var(--qt-border);
    border-right: 1px solid var(--qt-border);
}

.qt thead th:last-child, .qt tbody td:last-child {
    border-right: none;
}
.qt tbody tr:last-child td {
    border-bottom: none;
}

.w-serial {
    width: 90px;
}

.w-qty {
    width: 160px;
}

.w-rate {
    width: 160px;
}

.w-total {
    width: 200px;
}

.action-icon-btn {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    /* width: 120px; */
}

.qt-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.req {
    color: #ef4444;
}

.qt-input,
.qt-select select,
.qt-textarea {
    width: 100%;
    border: 1px solid var(--qt-border);
    border-radius: 5px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
    outline: none;
}

.qt-input:focus,
.qt-select select:focus,
.qt-textarea:focus {
    border-color: var(--qt-primary);
    box-shadow: unset;
}
.product-row .qt-input,
.product-row .qt-select select,
.product-row .qt-textarea {
    width: 100%;
    border: unset;
    border-radius: 10px;
    padding: 0;
    font: inherit;
    background: unset;
    outline: none;
    color: #606060;
}

.product-row .qt-input:focus,
.product-row .qt-select select:focus,
.product-row .qt-textarea:focus {
    border-color: unset;
    box-shadow: unset;
}

.qt-num {
    text-align: right;
}

.w-total strong {
    display: block;
    text-align: right;
    color: #606060;
    /* font-size: 1rem; */
}

.qt-icon-btn {
    border: unset;
    background: unset;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qt-icon-btn:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.sub-controls td {
    background: #fff;
}

.qt-subcontrols {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 0px;
    flex-wrap: wrap;
}

.qt-ghost {
    font-weight: 500;
    color: #1A2E47;
    font-size: 16px;
}

.qt-unit {
    display: flex;
    align-items: center;
    gap: 14px;
}

.qt-select {
    position: relative;
    min-width: 280px;
}

.qt-select select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    color: #606060;
    font-size: 16px;
}

.qt-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    font-size: 0.9rem;
}

.qt-add {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: unset;
    background: unset;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #606060;
}

.qt-add:hover {
    color: #606060;
}

.qt-plus {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    border: 1px solid var(--qt-border);
    font-size: 16px;
    transition: all 0.2s ease;
}

/* .qt-add:hover .qt-plus {
    border-color: var(--qt-primary);
    color: var(--qt-primary);
} */

.qt-textarea {
    min-height: 88px;
    resize: vertical;
    margin-top: 10px;
}

.qt-other {
    margin-top: 10px;
}

/* Invoice table wrapper */
.invoice-table-wrapper {
    border-radius: 14px;
    overflow: hidden;
}

@media (max-width: 960px) {
    .w-serial {
        width: 60px;
    }
    
    .w-qty,
    .w-rate,
    .w-total,
    .w-actions {
        width: auto;
    }
    
    .qt-subcontrols {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .qt-select {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .invoice-table-wrapper {
        overflow: scroll;
    }
    .gst-checkbox input[type="checkbox"]{
        width: 36px;
    }
    .gst-checkbox input[type=checkbox]:after{
        left: 6px;
    }
    .modal-content h3{
        font-size: 20px;
    }
}