/* JRE Quotation Generator - Frontend Styles (Professional Design) */

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-lighter: #dbeafe;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Container & Form */
.jre-quotation-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
}

.jre-quotation-form {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.jre-quotation-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.jre-print-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.jre-company-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.jre-company-logo-area {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: var(--shadow-md);
}

.jre-company-logo-area .jre-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 6px;
    box-sizing: border-box;
}

.jre-company-details {
    flex: 1;
}

.jre-company-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.jre-company-tagline {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.jre-company-meta {
    margin-top: 6px;
    font-size: 9px;
    color: var(--gray-600);
    line-height: 1.3;
}

.jre-company-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jre-company-meta-item {
    font-size: 9px;
    white-space: nowrap;
}

.jre-doc-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jre-doc-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.jre-quotation-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.jre-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jre-meta-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.jre-meta-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    margin-top: 4px;
}

.jre-meta-divider {
    width: 1px;
    height: 30px;
    background: var(--gray-300);
}

/* Sections */
.jre-section {
    margin-bottom: 30px;
}

.jre-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-lighter);
}

/* Customer Section */
.jre-customer-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #f3f4f6 100%);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.jre-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.jre-field-input-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jre-print-value {
    display: none;
    font-weight: 600;
    color: var(--gray-800);
    border-bottom: 1px dashed var(--gray-300);
    padding: 4px 0 2px;
    min-height: 18px;
    line-height: 1.3;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .jre-customer-grid {
        grid-template-columns: 1fr;
    }
}

.jre-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jre-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    gap: 4px;
}

.jre-input {
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--gray-800);
}

.jre-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.jre-input:disabled,
.jre-input[readonly] {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.jre-input::placeholder {
    color: var(--gray-400);
}

/* Description Section */
.jre-description-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid var(--warning-color);
}

.jre-description-box {
    background: var(--white);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.jre-description-text {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.8;
    margin: 0;
}

/* Product Section */
.jre-product-section {
    background: var(--gray-50);
    padding: 25px;
    border-radius: 10px;
    border: 2px dashed var(--gray-300);
}

.jre-product-input-wrapper {
    width: 100%;
}

/* Section title row with upload buttons */
.jre-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-lighter);
    flex-wrap: wrap;
}
.jre-section-title-row .jre-section-title {
    flex: 1;
    min-width: 120px;
}
.jre-upload-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.jre-product-input-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: flex-end;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: relative;
}

@media (max-width: 1024px) {
    .jre-product-input-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .jre-product-input-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .jre-upload-buttons {
        width: 100%;
        justify-content: center;
    }
}

.jre-search-wrapper {
    position: relative;
}

.jre-search-wrapper input {
    position: relative;
    z-index: 2;
    cursor: text;
    caret-color: var(--primary-color);
    color: var(--gray-800);
}

.jre-search-group {
    position: relative;
}

.jre-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-top: 1px solid var(--gray-300);
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: -1px;
}

.jre-dropdown-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.15s ease;
    display: block;
}

.jre-dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.jre-dropdown-item:hover {
    background: #e3f2fd;
    padding-left: 18px;
}

.jre-dropdown-item strong {
    display: block;
    color: var(--gray-900);
    font-size: 14px;
    margin-bottom: 4px;
}

.jre-dropdown-item strong mark {
    background-color: #fff3cd;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}

.jre-dropdown-item small {
    color: var(--gray-500);
    font-size: 12px;
}

/* Thumbnail column and images (mini square thumbs) */
.jre-col-image { width: 56px; text-align: center; }
.jre-thumb-mini, .jre-col-image img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; padding: 2px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }

/* Large thumbnail used in autocomplete dropdown / frontend product preview */
.jre-thumb-large { width: 75px; height: 75px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; padding: 3px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

/* Stronger selector for dropdown images to override .jre-dropdown-item img rules */
.jre-dropdown-item img.jre-thumb-large,
.jre-dropdown-item .jre-thumb-large {
    width: 75px !important;
    height: 75px !important;
}

/* Dropdown thumbnails (mini square) */
.jre-dropdown-item img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; margin-right: 12px; vertical-align: middle; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* Print and mobile toggle behavior */
@media print {
    .jre-col-image, .jre-dropdown-item img { display: none !important; }
    body.jre-show-images-print .jre-col-image,
    body.jre-show-images-print .jre-dropdown-item img { display: table-cell !important; display: inline-block !important; }
    /* hide the frontend image toggle controls in printed output */
    .jre-image-controls { display: none !important; }
    #jre-toggle-print-images, #jre-toggle-mobile-images { display: none !important; }
}

@media (max-width: 640px) {
    .jre-col-image { display: none !important; }
    body.jre-show-images-mobile .jre-col-image { display: table-cell !important; }
    .jre-dropdown-item img { width: 28px; height: 28px; }
    .jre-thumb-mini { width: 28px; height: 28px; }
    .jre-thumb-large { width: 56px !important; height: 56px !important; }
}

.jre-image-controls { margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.jre-image-controls label { font-size: 13px; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }

/* Buttons */
.jre-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.jre-btn:active {
    transform: scale(0.98);
}

.jre-btn-add {
    background: var(--primary-light);
    color: var(--white);
    padding: 12px 16px;
}

.jre-btn-add:hover {
    background: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.jre-btn-camera {
    background: var(--info-color);
    color: var(--white);
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
}
.jre-btn-camera:hover {
    background: #0891b2;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.jre-btn-upload {
    background: var(--success-color);
    color: var(--white);
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.jre-btn-upload:hover {
    background: #059669;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.jre-btn-success {
    background: var(--success-color);
    color: var(--white);
}

.jre-btn-success:hover {
    background: #059669;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.jre-btn-info {
    background: var(--info-color);
    color: var(--white);
}

.jre-btn-info:hover {
    background: #0891b2;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.jre-btn-secondary {
    background: var(--gray-400);
    color: var(--white);
}

.jre-btn-secondary:hover {
    background: var(--gray-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.jre-btn-small {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
}

.jre-btn-danger {
    background: var(--danger-color);
    color: var(--white);
    padding: 6px 12px;
    font-size: 11px;
}

.jre-btn-danger:hover {
    background: #dc2626;
}

.jre-btn-icon {
    font-size: 16px;
    line-height: 1;
}

@media print {
    .jre-btn-camera,
    .jre-btn-upload,
    .jre-upload-loading,
    .jre-upload-overlay,
    .jre-unmatched-modal-overlay {
        display: none !important;
    }
}

/* Upload Overlay */
.jre-upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.jre-upload-overlay-content {
    background: var(--white);
    padding: 40px 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}
.jre-upload-overlay-content p {
    margin: 10px 0 0;
    font-size: 16px;
    color: var(--gray-700);
}
.jre-upload-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--gray-200);
    border-top: 5px solid var(--primary-light);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: jre-spin 0.8s linear infinite;
}
@keyframes jre-spin {
    to { transform: rotate(360deg); }
}

/* Unmatched Items Modal */
.jre-unmatched-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}
.jre-unmatched-modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.jre-unmatched-modal-header {
    padding: 24px 24px 12px;
    border-bottom: 1px solid var(--gray-200);
}
.jre-unmatched-modal-header h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: var(--primary-color);
}
.jre-unmatched-modal-header p {
    margin: 0;
}
.jre-unmatched-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}
.jre-unmatched-modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--gray-200);
    text-align: right;
}
.jre-unmatched-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    transition: opacity 0.3s ease;
}
.jre-unmatched-card-header {
    font-size: 14px;
    margin-bottom: 8px;
}
.jre-unmatched-name {
    color: var(--primary-color);
    font-weight: 700;
}
.jre-suggestion-item {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.jre-suggestion-item:hover {
    border-color: var(--primary-light);
    background: #f0f7ff;
    transform: translateX(4px);
}
.jre-suggestion-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
}
.jre-suggestion-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-500);
}
.jre-suggestion-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}
.jre-unmatched-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

/* Products Table */
.jre-items-section {
    margin-top: 40px;
}

.jre-products-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.jre-print-table-wrapper {
    display: none;
    margin-top: 20px;
}

.jre-print-products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 13px;
}

.jre-print-products-table th,
.jre-print-products-table td {
    border: 1px solid var(--gray-300);
    padding: 10px;
}

.jre-print-products-table th {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    background: var(--gray-100);
    text-align: left;
}

.jre-print-text-right {
    text-align: right;
}

.jre-products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 14px;
}

.jre-products-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    position: sticky;
    top: 0;
}

.jre-products-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--primary-light);
}

.jre-products-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
}

.jre-products-table tbody tr {
    transition: all 0.2s;
}

.jre-products-table tbody tr:hover {
    background: var(--gray-50);
}

.jre-col-slno { width: 60px; text-align: center; }
.jre-col-desc { width: 30%; }
.jre-col-qty { width: 90px; text-align: right; }
.jre-col-rate { width: 100px; text-align: right; }
.jre-col-discount { width: 90px; text-align: right; }
.jre-col-amount { width: 120px; text-align: right; font-weight: 600; }
.jre-col-action { width: 150px; text-align: center; }

.jre-text-right {
    text-align: right;
}

.jre-text-center {
    text-align: center;
}

.jre-empty-row td {
    text-align: center;
    color: var(--gray-500);
    padding: 40px 16px;
    font-style: italic;
}

/* Totals Section */
.jre-totals-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #f3f4f6 100%);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.jre-totals-wrapper {
    max-width: 500px;
    margin-left: auto;
}

.jre-totals-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.jre-total-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
}

.jre-total-row:last-child {
    border-bottom: none;
}

.jre-row-subtotal {
    background: var(--gray-50);
}

.jre-row-gst {
    background: var(--gray-50);
}

.jre-row-roundoff {
    background: var(--gray-50);
}

.jre-total-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.jre-total-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    text-align: right;
}

.jre-input-wrapper {
    width: 100%;
}

.jre-total-input {
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    width: 100%;
}

.jre-total-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.jre-row-final {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 20px;
    font-weight: 700;
    border-bottom: none;
}

.jre-total-label-final {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
}

.jre-total-value-final {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    font-family: 'Courier New', monospace;
    text-align: right;
}

/* Actions Section */
.jre-actions-section {
    margin-top: 40px;
}

.jre-button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.jre-share-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.jre-share-menu {
    position: absolute;
    top: 100%;
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
    z-index: 1000;
    min-width: 160px;
    gap: 6px;
}

.jre-share-menu .jre-btn {
    width: 100%;
    justify-content: center;
}

.jre-btn-warning {
    background: #f59e0b;
    color: #ffffff;
}

.jre-btn-primary {
    background: #4f46e5;
    color: #ffffff;
}

.jre-btn-primary:hover {
    background: #4338ca;
}

.jre-btn-warning:hover {
    background: #d97706;
}

.jre-btn-whatsapp {
    background: #25d366;
    color: #ffffff;
}

.jre-btn-whatsapp:hover {
    background: #1fb257;
}

.jre-btn-email {
    background: #3b82f6;
    color: #ffffff;
}

.jre-btn-email:hover {
    background: #2563eb;
}

@media (max-width: 640px) {
    .jre-button-group {
        flex-direction: column;
    }

    .jre-button-group .jre-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@page {
    size: A4 portrait;
    margin: 0;
    padding: 0;
}

@media print {
    html,
    body {
        background: #ffffff !important;
        font-size: 9px !important;
        line-height: 1.1 !important;
        color: #111111 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
    }

    body::before,
    body::after {
        display: none !important;
    }

    body,
    #page,
    #content,
    .site,
    .site-content,
    .content-area,
    .site-main,
    .entry,
    .entry-content,
    .page,
    .page-content,
    .container,
    .et_pb_section,
    .et_pb_row,
    .et_pb_column {
        display: block !important;
        visibility: visible !important;
    }

    .wp-admin-bar,
    .admin-bar,
    nav,
    footer,
    #adminbar,
    .navbar,
    .site-header,
    .site-footer,
    [role="banner"],
    [role="contentinfo"],
    .site-navigation,
    .main-navigation,
    .nav-primary {
        display: none !important;
    }

    .jre-quotation-container {
        display: block !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        width: 100% !important;
        height: auto !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    .jre-quotation-form {
        display: block !important;
        width: 100% !important;
        padding: 2mm 4mm !important;
        font-size: 9px !important;
        margin: 0 !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    .jre-section {
        margin-bottom: 2px !important;
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
    }

    .jre-section-title {
        font-size: 9px !important;
        margin-bottom: 1px !important;
        padding-bottom: 1px !important;
        border-bottom: 1px solid #bbbbbb !important;
        letter-spacing: 0.3px !important;
        display: none !important;
    }

    .jre-quotation-header-section,
    .jre-customer-section,
    .jre-items-section,
    .jre-totals-section,
    .jre-description-section {
        page-break-inside: avoid !important;
        display: block !important;
        visibility: visible !important;
    }

    .jre-quotation-header-section {
        padding: 2px 0 !important;
        margin-bottom: 2px !important;
        border-bottom: 2px solid #000000 !important;
        gap: 6px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        flex-wrap: wrap !important;
        height: auto !important;
        overflow: visible !important;
    }

    .jre-print-header {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 6px !important;
        align-items: flex-start !important;
    }

    .jre-company-info {
        gap: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .jre-company-logo-area {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
    }

    .jre-company-name {
        font-size: 15px !important;
        margin: 0 !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
        padding: 0 !important;
    }

    .jre-company-meta {
        margin-top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        align-self: flex-start !important;
    }  
     
    .jre-company-meta-row {
        line-height: 1.1 !important;
        margin-top: 0 !important;
    }

    .jre-company-details {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .jre-company-tagline {
        display: none !important;
    }

    .jre-doc-title {
        font-size: 16px !important;
        letter-spacing: 1px !important;
        font-weight: 700 !important;
    }

    .jre-quotation-meta {
        gap: 6px !important;
        display: flex !important;
    }

    .jre-print-meta-box {
        border: 1px solid #000000 !important;
        padding: 1px 4px !important;
        min-width: 120px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        text-align: left !important;
    }

    .jre-print-meta-label {
        font-size: 8px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        color: #000000 !important;
        font-weight: 700 !important;
    }

    .jre-print-meta-value {
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #000000 !important;
        letter-spacing: 0.1px !important;
    }

    .jre-customer-section {
        background: transparent !important;
        border: 1px solid #000000 !important;
        padding: 2px !important;
        margin-bottom: 2px !important;
        display: block !important;
    }

    .jre-customer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1px 6px !important;
        display: grid !important;
    }

    .jre-form-group {
        gap: 0 !important;
        display: grid !important;
        grid-template-columns: 60px minmax(0, 1fr) !important;
        align-items: center !important;
    }

    .jre-form-group label {
        font-size: 8px !important;
        color: #222222 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        margin-right: 1px !important;
        font-weight: 700 !important;
    }

    .jre-input,
    .jre-total-input {
        border: none !important;
        border-bottom: 1px solid #777777 !important;
        border-radius: 0 !important;
        padding: 1px 0 !important;
        font-size: 9px !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .jre-field-input-stack {
        gap: 1px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .jre-field-input-stack .jre-input {
        display: none !important;
    }

    .jre-field-input-stack .jre-print-value {
        display: block !important;
        border: 1px solid #000000 !important;
        border-radius: 0 !important;
        padding: 1px 1px !important;
        min-height: 12px !important;
        font-size: 9px !important;
        font-weight: 600 !important;
        color: #000000 !important;
        white-space: pre-wrap !important;
        line-height: 1.1 !important;
    }

    .jre-description-section {
        display: none !important;
    }

    .jre-description-text {
        display: none !important;
    }

    .jre-loyalty-advance-section,
    .jre-product-section,
    .jre-actions-section,
    .jre-btn,
    .jre-dropdown {
        display: none !important;
    }

    .jre-products-table-wrapper {
        display: none !important;
    }

    .jre-print-table-wrapper {
        display: block !important;
        border: 1px solid #000000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-top: 2px !important;
        margin-bottom: 2px !important;
    }

    .jre-print-products-table {
        font-size: 9px !important;
        table-layout: fixed !important;
        line-height: 1.1 !important;
        border: 1px solid #000000 !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .jre-print-products-table thead {
        display: table-header-group !important;
        background: #f2f2f2 !important;
    }

    .jre-print-products-table th,
    .jre-print-products-table td {
        border: 1px solid #000000 !important;
        padding: 2px 2px !important;
    }

    .jre-print-products-table th {
        font-size: 9px !important;
        letter-spacing: 0.2px !important;
        text-align: center !important;
        font-weight: 700 !important;
    }

    .jre-print-products-table td {
        font-size: 9px !important;
        padding: 2px 2px !important;
    }

    .jre-print-products-table tbody tr {
        page-break-inside: avoid !important;
        min-height: 8px !important;
    }

    .jre-print-products-table tbody tr:nth-of-type(35n):not(:last-child) {
        page-break-after: always !important;
    }

    .jre-print-col-item-code {
        width: 12% !important;
    }

    .jre-print-col-desc {
        width: 26% !important;
    }

    .jre-print-col-hsn {
        width: 10% !important;
    }

    .jre-print-col-gst {
        width: 8% !important;
    }

    .jre-print-col-qty,
    .jre-print-col-gst,
    .jre-print-col-rate,
    .jre-print-col-amount,
    .jre-print-col-slno {
        text-align: center !important;
    }

    .jre-print-col-rate,
    .jre-print-col-amount,
    .jre-print-col-qty {
        text-align: right !important;
    }

    .jre-print-total-row td {
        font-weight: 700 !important;
        border-top: 2px solid #000000 !important;
        padding: 2px 2px !important;
    }

    .jre-totals-section {
        background: transparent !important;
        border: 1px solid #000000 !important;
        padding: 2px !important;
        margin-top: 2px !important;
        display: block !important;
    }

    .jre-totals-wrapper {
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    .jre-totals-breakdown {
        gap: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .jre-total-row {
        padding: 2px 3px !important;
        border-bottom: 1px solid #cccccc !important;
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 10px !important;
    }

    .jre-total-row:last-child {
        border-bottom: none !important;
    }

    .jre-total-label,
    .jre-total-value,
    .jre-total-label-final,
    .jre-total-value-final {
        color: #111111 !important;
        font-size: 9px !important;
    }

    .jre-total-label {
        font-weight: 600 !important;
        padding: 1px 2px !important;
    }

    .jre-total-value {
        font-weight: 700 !important;
        padding: 1px 2px !important;
        text-align: right !important;
        font-size: 9px !important;
    }

    .jre-total-label-final {
        font-weight: 700 !important;
        padding: 1px 2px !important;
        font-size: 9px !important;
    }

    .jre-total-value-final {
        font-weight: 700 !important;
        padding: 1px 2px !important;
        font-size: 10px !important;
        text-align: right !important;
    }

    .jre-row-final {
        background: transparent !important;
        border-top: 2px solid #000000 !important;
        padding: 2px 3px !important;
    }

    #qty_discount_row,
    #loyal_discount_row,
    #advance_discount_row {
        display: none !important;
    }

    /* Print: make product thumbnails very small to fit more rows */
    .jre-print-col-image,
    .jre-print-col-image img,
    .jre-print-products-table img.jre-thumb-mini,
    .jre-print-products-table .jre-thumb-mini {
        width: 20px !important;
        height: 20px !important;
        padding: 1px !important;
        border-radius: 3px !important;
        box-shadow: none !important;
        vertical-align: middle !important;
    }

    /* Reduce the image column width in print table */
    .jre-print-col-image { width: 28px !important; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .jre-quotation-container {
        margin: 10px;
        padding: 15px;
    }

    .jre-quotation-header-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        margin-bottom: 30px;
        gap: 20px;
    }

    .jre-company-info {
        justify-content: center;
    }

    .jre-doc-info {
        text-align: center;
    }

    .jre-quotation-meta {
        justify-content: center;
    }

    .jre-meta-divider {
        width: 30px;
        height: 1px;
    }

    .jre-products-table th,
    .jre-products-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .jre-col-desc { display: none; }
    .jre-col-rate { display: none; }

    .jre-products-table thead th:nth-child(2),
    .jre-products-table tbody td:nth-child(2) {
        text-align: left;
    }

    .jre-totals-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .jre-quotation-container {
        margin: 5px;
        padding: 12px;
    }

    .jre-company-name {
        font-size: 18px;
    }

    .jre-doc-title {
        font-size: 20px;
    }

    .jre-meta-value {
        font-size: 14px;
    }

    .jre-section-title {
        font-size: 14px;
    }

    .jre-form-group label {
        font-size: 12px;
    }

    .jre-input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .jre-products-table th,
    .jre-products-table td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .jre-col-qty { width: 60px; }
    .jre-col-discount { width: 70px; }
    .jre-col-action { width: 120px; }

    .jre-total-value,
    .jre-total-label {
        font-size: 13px;
    }

    .jre-total-value-final,
    .jre-total-label-final {
        font-size: 16px;
    }

    .jre-btn {
        padding: 10px 14px;
        font-size: 11px;
    }

    .jre-button-group {
        flex-direction: column;
        gap: 8px;
    }

    .jre-button-group .jre-btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.jre-loading {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Unit of Measure Styling */
.jre-qty-unit-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.jre-qty-unit-wrapper .jre-input {
    flex: 1;
    min-width: 100px;
}

.jre-qty-unit-wrapper select.jre-input {
    flex: 0.8;
    min-width: 80px;
    cursor: pointer;
    appearance: auto;
}

.jre-qty-unit-wrapper select.jre-input:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive - stack on small screens */
@media (max-width: 768px) {
    .jre-qty-unit-wrapper {
        flex-direction: column;
    }
    
    .jre-qty-unit-wrapper select.jre-input {
        flex: 1;
        min-width: unset;
    }
}

/* Accessibility */
.jre-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.jre-input:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jre-quotation-container {
        margin: 10px;
        padding: 15px;
    }

    .jre-quotation-header-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        margin-bottom: 30px;
        gap: 20px;
    }

    .jre-company-info {
        justify-content: center;
    }

    .jre-doc-info {
        text-align: center;
    }

    .jre-quotation-meta {
        justify-content: center;
    }

    .jre-meta-divider {
        width: 30px;
        height: 1px;
    }

    .jre-products-table th,
    .jre-products-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .jre-col-desc { display: none; }
    .jre-col-rate { display: none; }

    .jre-products-table thead th:nth-child(2),
    .jre-products-table tbody td:nth-child(2) {
        text-align: left;
    }

    .jre-totals-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .jre-quotation-container {
        margin: 5px;
        padding: 12px;
    }

    .jre-company-name {
        font-size: 18px;
    }

    .jre-doc-title {
        font-size: 20px;
    }

    .jre-meta-value {
        font-size: 14px;
    }

    .jre-section-title {
        font-size: 14px;
    }

    .jre-form-group label {
        font-size: 12px;
    }

    .jre-input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .jre-products-table th,
    .jre-products-table td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .jre-col-qty { width: 60px; }
    .jre-col-discount { width: 70px; }
    .jre-col-action { width: 120px; }

    .jre-total-value,
    .jre-total-label {
        font-size: 13px;
    }

    .jre-total-value-final,
    .jre-total-label-final {
        font-size: 16px;
    }

    .jre-btn {
        padding: 10px 14px;
        font-size: 11px;
    }

    .jre-button-group {
        flex-direction: column;
        gap: 8px;
    }

    .jre-button-group .jre-btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.jre-loading {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Unit of Measure Styling */
.jre-qty-unit-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.jre-qty-unit-wrapper .jre-input {
    flex: 1;
    min-width: 100px;
}

.jre-qty-unit-wrapper select.jre-input {
    flex: 0.8;
    min-width: 80px;
    cursor: pointer;
    appearance: auto;
}

.jre-qty-unit-wrapper select.jre-input:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive - stack on small screens */
@media (max-width: 768px) {
    .jre-qty-unit-wrapper {
        flex-direction: column;
    }
    
    .jre-qty-unit-wrapper select.jre-input {
        flex: 1;
        min-width: unset;
    }
}

/* Accessibility */
.jre-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.jre-input:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

