/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding-top: 8px; /* Account for fixed navbar */
    font-weight: normal;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header Styles */
.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: bold;
    color: white;
}

.app-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
    font-weight: bold;
}

.auto-save-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    animation: fadeInOut 2s ease-in-out;
}

.save-icon {
    font-size: 1rem;
}

.save-text {
    font-weight: 500;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

/* Layout Container for Side-by-Side Layout */
.layout-container {
    display: flex;
    gap: 32px;
    width: 100%;
    align-items: flex-start;
    padding: 32px;
}

/* Template Navigation Section */
.template-nav-section {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    flex: 0 0 380px;
    width: 380px;
    height: fit-content;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}


.template-tools-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.template-tools-section .tool-group {
    margin-bottom: 20px;
    
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.4);
    transition: all 0.3s ease;
}

.template-tools-section .tool-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 15px;
}

.template-tools-section .tool-group:last-child {
    margin-bottom: 0;
}

.template-tools-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.template-tools-section .tool-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

        .old-data-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
            position: relative;
        }

        .load-clear-container {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            position: relative;
        }

        .btn-clear-small {
            background: #dc2626;
            border: none;
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            transition: all 0.2s ease;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .btn-clear-small:hover {
            background: #b91c1c;
            transform: scale(1.05);
        }

        .btn-clear-small:active {
            transform: scale(0.95);
        }

        .clear-x {
            line-height: 1;
        }

.template-tools-section .btn-tool {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #374151;
    color: white;
    border: 1px solid #374151;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.template-tools-section .btn-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.template-tools-section .btn-tool::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}


.template-tools-section .btn-tool.has-data {
    background: #10b981;
    border-color: #10b981;
    color: white;
}


.template-tools-section .btn-clear {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 2px;
    margin-left: auto;
    margin-right: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    max-width: 80px;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
    align-self: flex-end;
}

.template-tools-section .btn-clear:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #f87171;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}

.template-tools-section .btn-clear:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1);
}

.template-tools-section .clear-icon {
    font-size: 0.8rem;
}

.template-tools-section .clear-text {
    font-size: 0.7rem;
    font-weight: 500;
}


.currency-label {
    display: block;
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
    font-weight: 500;
}

.template-tools-section .currency-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 10px;
    background: #f3f4f6;
    color: #1a202c;
    transition: all 0.3s ease;
    cursor: pointer;
}


.template-tools-section .currency-select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.logo-upload-label {
    display: block;
    cursor: pointer;
    width: 100%;
}

.logo-upload-label small {
    display: block;
    font-size: 11px;
    color: #ccc;
    margin-top: 5px;
    text-align: center;
}

.template-tools-section .logo-upload-container {
    width: 100%;
    position: relative;
}

.template-tools-section .logo-upload-input {
    display: none;
}

.template-tools-section .logo-placeholder {
    padding: 20px;
    text-align: center;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
   
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.template-tools-section .logo-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}


.template-tools-section .logo-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: rgba(102, 126, 234, 0.7);
    transition: all 0.3s ease;
}


.template-tools-section .logo-placeholder p {
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
    font-weight: 500;
}

.template-tools-section .logo-preview {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.template-tools-section .logo-preview-img {
    max-width: 100%;
    max-height: 80px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-tools-section .btn-remove {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}


.template-nav-section h2 {
    color: #1a202c;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    position: relative;
    border-bottom: none;
    padding-bottom: 0;
    text-align: left;
}

.template-nav-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.template-nav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-nav-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.template-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}


.template-nav-item.active {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.template-nav-item.active::before {
    opacity: 1;
}

.template-nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.template-nav-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}


.template-nav-icon.modern-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1a202c;
}

.template-nav-icon.classic-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #1a202c;
}

.template-nav-icon.elegant-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #1a202c;
}

.template-nav-icon.minimal-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #1a202c;
}

.template-nav-icon.corporate-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #1a202c;
}

.template-nav-info {
    flex: 1;
}

.template-nav-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.template-nav-info p {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

/* Editable Preview Section */
.editable-preview-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}


.preview-header {
   
    backdrop-filter: blur(5px);
    padding: 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    color: #1a202c;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-preview-generate,
.btn-preview-download {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn-preview-generate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1a202c;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-preview-generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}


.btn-preview-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #1a202c;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

.btn-preview-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}


.btn-preview-download:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.editable-preview {
    padding: 36px;
    min-height: 600px;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(225, 229, 233, 0.6);
    border-radius: 12px;
    margin: 24px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}


/* Editable Field Styles */
.editable-field {
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: inherit;
    font-family: inherit;
    width: 100%;
    color: #1a202c;
    font-weight: normal;
}

/* Editable Field Container */
.editable-field-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Make room for the icon on the right without shifting layout */
.editable-field-container .editable-field {
    padding-right: 24px;
}

/* Edit Icon */
.edit-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    font-size: 0; /* hide any inline text */
    line-height: 0;
    /* Slim, outlined black pencil icon at a gentle angle (preferred style) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><g transform='rotate(-15 12 12)'><path d='M12.5 5.5l6 6M4 16l-1 5 5-1 11.5-11.5a1.8 1.8 0 0 0 0-2.5l-1.5-1.5a1.8 1.8 0 0 0-2.5 0L4 16z'/></g></svg>");
}

/* Place the icon on the left side of the input within the container */
.editable-field-container:hover .edit-icon {
    opacity: 1;
    visibility: visible;
}

.edit-icon:hover {
    opacity: 1;
}

/* Hide edit icons when printing/downloading */
@media print {
    .edit-icon {
        display: none !important;
    }
    
    .editable-field-container {
        display: block;
    }
}


.editable-field:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.editable-field[readonly] {
    background: #ffffff;
    color: #ccc;
    cursor: default;
}

.editable-field[readonly]:hover {
    border-color: transparent;
    background: #ffffff;
}

/* Design Selector Styles */
.design-selector-section {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 15px;
    border-left: 4px solid #007bff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.design-selector-section h2 {
    color: #1a202c;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
}

.design-selector-section::after {
    display: block;
    text-align: center;
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.design-subtitle {
    text-align: center;
    color: #ccc;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.design-grid {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

/* Container positioning for arrows */

/* Hide scrollbar */
.design-grid::-webkit-scrollbar {
    display: none;
}

.design-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Navigation arrows */
.design-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #007bff;
    color: #1a202c;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.design-scroll-arrow:hover {
    background: #0056b3;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.design-scroll-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.design-scroll-arrow.disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.design-scroll-arrow.disabled:hover {
    background: #6c757d;
    transform: translateY(-50%);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.design-scroll-arrow-left {
    left: 10px;
}

.design-scroll-arrow-right {
    right: 10px;
}

.design-option {
    background: #ffffff;
    border: 3px solid #dee2e6;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex: 0 0 calc(50% - 1rem);
    min-width: 320px;
    max-width: 400px;
    scroll-snap-align: start;
}

.design-option:hover {
    border-color: #007bff;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.2);
}

.design-option.selected {
    border-color: #007bff;
    background: #ffffff;
    color: #1a202c;
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.3);
}

.design-preview {
    height: 220px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.preview-header {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #e9ecef;
}

.preview-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.preview-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
}

.preview-content {
    padding: 1.5rem;
}

.preview-company {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #212529;
}

.preview-customer {
    font-size: 0.75rem;
    color: #ccc;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f8f9fa;
}

.preview-items {
    margin-bottom: 1rem;
}

.preview-item {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 0.25rem;
    padding: 0.25rem 0;
}

.preview-total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
    text-align: right;
    padding-top: 0.5rem;
    border-top: 2px solid #e9ecef;
}

/* Sample Quotation Styles - Different Layout Formats */
.sample-quotation {
    background: #ffffff;
    color: #1a202c;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.6rem;
}

/* Sub description styling */
.sample-quotation .sub-description {
    font-size: 0.45rem;
    color: #ccc;
    font-style: italic;
    margin-top: 0.1rem;
    line-height: 1.1;
}

/* 1. Standard Format (Modern) */
.modern-sample .quote-header-bar {
    background: #0d6efd;
    color: #fff;
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-sample .quote-header-bar h2 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.modern-sample .quote-number {
    font-size: 0.65rem;
    font-weight: 600;
}

.modern-sample .quote-content {
    padding: 0.6rem;
}

.modern-sample .company-section h3 {
    margin: 0 0 0.2rem 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0d6efd;
}

.modern-sample .company-section p {
    margin: 0.15rem 0;
    font-size: 0.55rem;
    color: #ccc;
}

.modern-sample .quote-details {
    margin: 0.4rem 0;
}

.modern-sample .detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    margin: 0.15rem 0;
}

.modern-sample .customer-section h4 {
    margin: 0.4rem 0 0.2rem 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: #495057;
}

.modern-sample .items-table {
    margin: 0.6rem 0;
}

.modern-sample .table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.2rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 0.55rem;
}

.modern-sample .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.2rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.55rem;
}

.modern-sample .total-section {
    margin-top: 0.6rem;
    padding-top: 0.4rem;
    border-top: 2px solid #e9ecef;
}

.modern-sample .total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.65rem;
}

/* 2. GST Format (Classic) */
.classic-sample .gst-header {
    background: #28a745;
    color: #fff;
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.classic-sample .company-logo h3 {
    margin: 0 0 0.2rem 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.classic-sample .company-logo p {
    margin: 0;
    font-size: 0.55rem;
}

.classic-sample .quote-info h2 {
    margin: 0 0 0.2rem 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: right;
}

.classic-sample .quote-info p {
    margin: 0.15rem 0;
    font-size: 0.55rem;
    text-align: right;
}

.classic-sample .gst-content {
    padding: 0.6rem;
}

.classic-sample .billing-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.classic-sample .bill-from, .classic-sample .bill-to {
    flex: 1;
}

.classic-sample .bill-from h4, .classic-sample .bill-to h4 {
    margin: 0 0 0.2rem 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: #28a745;
}

.classic-sample .bill-from p, .classic-sample .bill-to p {
    margin: 0.15rem 0;
    font-size: 0.55rem;
    color: #ccc;
}

.classic-sample .items-table {
    margin: 0.6rem 0;
}

.classic-sample .items-table .table-header,
.classic-sample .items-table .table-row {
    display: grid;
    grid-template-columns: 2fr 0.8fr 0.8fr 0.8fr 1fr;
    gap: 0.2rem;
    padding: 0.2rem 0;
    font-size: 0.55rem;
}

.classic-sample .items-table .table-header {
    font-weight: bold;
    border-bottom: 1px solid #dee2e6;
}

.classic-sample .items-table .table-row {
    border-bottom: 1px solid #f8f9fa;
}

.classic-sample .gst-totals {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 2px solid #e9ecef;
}

.classic-sample .summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin: 0.2rem 0;
}

.classic-sample .summary-row.total {
    font-weight: 700;
    font-size: 0.65rem;
    color: #28a745;
}

/* 3. Product Image Format (Elegant) */
.elegant-sample .product-header {
    background: #6f42c1;
    color: #fff;
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.elegant-sample .company-details h3 {
    margin: 0 0 0.3rem 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.elegant-sample .company-details p {
    margin: 0.2rem 0;
    font-size: 0.65rem;
}

.elegant-sample .quote-badge h2 {
    margin: 0 0 0.3rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
}

.elegant-sample .quote-badge p {
    margin: 0.2rem 0;
    font-size: 0.65rem;
    text-align: right;
}

.elegant-sample .product-content {
    padding: 0.6rem;
}

.elegant-sample .customer-details h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: #6f42c1;
}

.elegant-sample .customer-details p {
    margin: 0.2rem 0;
    font-size: 0.65rem;
    color: #ccc;
}

.elegant-sample .product-items {
    margin: 0.6rem 0;
}

.elegant-sample .product-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.elegant-sample .product-image {
    width: 30px;
    height: 30px;
    background: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.elegant-sample .product-info {
    flex: 1;
}

.elegant-sample .product-info h5 {
    margin: 0 0 0.2rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

.elegant-sample .product-info p {
    margin: 0;
    font-size: 0.6rem;
    color: #ccc;
}

.elegant-sample .product-price {
    font-weight: 700;
    font-size: 0.65rem;
    color: #6f42c1;
}

.elegant-sample .product-total {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 2px solid #e9ecef;
}

.elegant-sample .total-amount {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.65rem;
}

/* 4. Shipping Format (Minimal) */
.minimal-sample .shipping-header {
    background: #6c757d;
    color: #fff;
    padding: 0.6rem;
    text-align: center;
}

.minimal-sample .shipping-header h2 {
    margin: 0 0 0.3rem 0;
    font-size: 0.8rem;
    font-weight: 700;
}

.minimal-sample .quote-ref {
    font-size: 0.7rem;
    font-weight: 600;
}

.minimal-sample .shipping-content {
    padding: 0.6rem;
}

.minimal-sample .address-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.minimal-sample .from-address, .minimal-sample .to-address {
    flex: 1;
}

.minimal-sample .from-address h4, .minimal-sample .to-address h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: #ccc;
}

.minimal-sample .from-address p, .minimal-sample .to-address p {
    margin: 0.2rem 0;
    font-size: 0.65rem;
    color: #ccc;
}

.minimal-sample .shipping-details {
    margin: 0.6rem 0;
}

.minimal-sample .detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    margin: 0.2rem 0;
}

.minimal-sample .shipping-items {
    margin: 0.6rem 0;
}

.minimal-sample .shipping-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.65rem;
}

.minimal-sample .shipping-total {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 2px solid #e9ecef;
}

.minimal-sample .total-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin: 0.2rem 0;
}

.minimal-sample .total-line.final {
    font-weight: 700;
    font-size: 0.65rem;
    color: #ccc;
}

/* 5. Proposal Format (Corporate) */
.corporate-sample .proposal-header {
    background: #343a40;
    color: #fff;
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.corporate-sample .company-brand h3 {
    margin: 0 0 0.3rem 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.corporate-sample .company-brand p {
    margin: 0;
    font-size: 0.65rem;
    opacity: 0.9;
}

.corporate-sample .proposal-title h2 {
    margin: 0 0 0.3rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
}

.corporate-sample .proposal-title p {
    margin: 0.2rem 0;
    font-size: 0.65rem;
    text-align: right;
}

.corporate-sample .proposal-content {
    padding: 0.6rem;
}

.corporate-sample .client-section h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: #343a40;
}

.corporate-sample .client-section p {
    margin: 0.2rem 0;
    font-size: 0.65rem;
    color: #ccc;
}

.corporate-sample .proposal-items {
    margin: 0.6rem 0;
}

.corporate-sample .proposal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.corporate-sample .service-title {
    font-weight: 600;
    font-size: 0.75rem;
    color: #495057;
}

.corporate-sample .service-desc {
    font-size: 0.6rem;
    color: #ccc;
    margin-top: 0.1rem;
}

.corporate-sample .service-price {
    font-weight: 700;
    font-size: 0.65rem;
    color: #343a40;
}

.corporate-sample .proposal-summary {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 2px solid #e9ecef;
}

.corporate-sample .summary-section h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.65rem;
    font-weight: 600;
    color: #343a40;
}

.corporate-sample .investment-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin: 0.2rem 0;
}

.corporate-sample .investment-row:first-child {
    font-weight: 700;
    font-size: 0.65rem;
    color: #343a40;
}

.design-option label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #1a202c;
    font-size: 0.75rem;
}

.design-option input[type="radio"] {
    display: none;
}

.design-option.selected label {
    color: #1a202c;
    font-weight: 700;
}

.design-name {
    font-weight: 700;
    color: #212529;
    font-size: 1.1rem;
}

.design-description {
    color: #ccc;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Enhanced Responsive Design Selector */
@media (max-width: 992px) {
    .design-grid {
        gap: 1.5rem;
    }
    
    .design-option {
        flex: 0 0 calc(55% - 0.75rem);
        min-width: 280px;
    }
    
    .design-preview {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .design-grid {
        gap: 1.5rem;
    }
    
    .design-option {
        padding: 1.25rem;
        flex: 0 0 calc(70% - 0.75rem);
        min-width: 260px;
    }
    
    .design-preview {
        height: 240px;
    }
    
    .preview-header {
        padding: 1rem;
    }
    
    .preview-content {
        padding: 1rem;
    }
    
    .sample-quotation {
        font-size: 0.65rem;
    }
    
    /* Improved table layouts for mobile */
    .modern-sample .table-header,
    .modern-sample .table-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 0.2rem;
    }
    
    .classic-sample .items-table .table-header,
    .classic-sample .items-table .table-row {
        grid-template-columns: 2fr 0.8fr 0.8fr 0.8fr 1fr;
        gap: 0.2rem;
    }
}

@media (max-width: 576px) {
    .design-selector-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .design-selector-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .design-selector-section::after {
        content: "← Tap arrows or swipe to see all formats →";
        font-size: 0.8rem;
    }

    
    .design-scroll-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .design-scroll-arrow-left {
        left: 5px;
    }
    
    .design-scroll-arrow-right {
        right: 5px;
    }
    
    .design-grid {
        gap: 1rem;
    }
    
    .design-option {
        padding: 0.75rem;
        flex: 0 0 calc(85% - 0.5rem);
        min-width: 240px;
    }
    
    .design-preview {
        height: 200px;
    }
    
    .sample-quotation {
        font-size: 0.55rem;
    }
    
    /* Better mobile table layouts */
    .modern-sample .table-header,
    .modern-sample .table-row {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 0.9fr;
        gap: 0.15rem;
        font-size: 0.6rem;
    }
    
    .classic-sample .items-table .table-header,
    .classic-sample .items-table .table-row {
        grid-template-columns: 1.5fr 0.6fr 0.6fr 0.6fr 0.8fr;
        gap: 0.15rem;
        font-size: 0.5rem;
    }
    
    .elegant-sample .items-table .table-header,
    .elegant-sample .items-table .table-row {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 0.9fr;
        gap: 0.15rem;
        font-size: 0.6rem;
    }
    
    .minimal-sample .items-table .table-header,
    .minimal-sample .items-table .table-row {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 0.9fr;
        gap: 0.15rem;
        font-size: 0.6rem;
    }
    
    .corporate-sample .items-table .table-header,
    .corporate-sample .items-table .table-row {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 0.9fr;
        gap: 0.15rem;
        font-size: 0.6rem;
    }
}

/* Enhanced Quotation Design Themes - FIXED FOR VISIBILITY */
.quotation-theme-modern {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #1a202c;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid #007bff;
}

.quotation-theme-modern .quotation-header {
    background: #ffffff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quotation-theme-modern .quotation-title {
    background: #007bff;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 2rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.quotation-theme-modern .items-table {
    background: #ffffff;
    border: 2px solid #007bff;
    border-radius: 8px;
    overflow: hidden;
}

.quotation-theme-modern .items-table th {
    background: #007bff;
    color: #fff;
    border: 1px solid #0056b3;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.quotation-theme-modern .items-table td {
    border: 1px solid #dee2e6;
    padding: 1rem;
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
}

.quotation-theme-modern .summary-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border: 2px solid #007bff;
}

.quotation-theme-modern .summary-row {
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0;
    color: #1a202c;
}

.quotation-theme-classic {
    font-family: 'Times New Roman', serif;
    background: #ffffff;
    color: #1a202c;
    padding: 2rem;
    border: 3px solid #333;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.quotation-theme-classic .quotation-header {
    border: 2px solid #333;
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quotation-theme-classic .quotation-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 2rem 0;
    text-transform: uppercase;
    border-bottom: 3px solid #333;
    padding-bottom: 1rem;
    color: #1a202c;
}

.quotation-theme-classic .items-table {
    border: 2px solid #333;
    background: #ffffff;
}

.quotation-theme-classic .items-table th {
    background: #f8f9fa;
    color: #1a202c;
    border: 1px solid #333;
    padding: 1rem;
    font-weight: bold;
    text-align: center;
    font-size: 0.8rem;
}

.quotation-theme-classic .items-table td {
    border: 1px solid #333;
    padding: 1rem;
    text-align: center;
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
}

.quotation-theme-classic .summary-section {
    border: 2px solid #333;
    padding: 1.5rem;
    margin-top: 2rem;
    background: #ffffff;
}

.quotation-theme-elegant {
    font-family: 'Georgia', serif;
    background: #ffffff;
    color: #1a202c;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid #6f42c1;
}

.quotation-theme-elegant .quotation-header {
    background: #ffffff;
    border: 2px solid #6f42c1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quotation-theme-elegant .quotation-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 2rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6f42c1;
    border-bottom: 3px solid #6f42c1;
    padding-bottom: 1rem;
}

.quotation-theme-elegant .items-table {
    border: 2px solid #6f42c1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.quotation-theme-elegant .items-table th {
    background: #6f42c1;
    color: #fff;
    border: 1px solid #5a32a3;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
}

.quotation-theme-elegant .items-table td {
    border: 1px solid #dee2e6;
    padding: 1rem;
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
}

.quotation-theme-elegant .summary-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border: 2px solid #6f42c1;
}

.quotation-theme-minimal {
    font-family: 'Arial', sans-serif;
    background: #ffffff;
    color: #1a202c;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.quotation-theme-minimal .quotation-header {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quotation-theme-minimal .quotation-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    margin: 2rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1a202c;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 1rem;
}

.quotation-theme-minimal .items-table {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #ffffff;
}

.quotation-theme-minimal .items-table th {
    background: #ffffff;
    color: #1a202c;
    border: 1px solid #dee2e6;
    padding: 1rem;
    font-weight: 500;
    text-align: left;
    font-size: 0.8rem;
}

.quotation-theme-minimal .items-table td {
    border: 1px solid #dee2e6;
    padding: 1rem;
    background: #ffffff;
    color: #1a202c;
    font-weight: 400;
}

.quotation-theme-minimal .summary-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
    border: 1px solid #dee2e6;
}

.quotation-theme-corporate {
    font-family: 'Arial', sans-serif;
    background: #ffffff;
    color: #1a202c;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid #28a745;
}

.quotation-theme-corporate .quotation-header {
    background: #ffffff;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quotation-theme-corporate .quotation-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 2rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #28a745;
    border-bottom: 3px solid #28a745;
    padding-bottom: 1rem;
}

.quotation-theme-corporate .items-table {
    border: 2px solid #28a745;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.quotation-theme-corporate .items-table th {
    background: #28a745;
    color: #fff;
    border: 1px solid #1e7e34;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
}

.quotation-theme-corporate .items-table td {
    border: 1px solid #dee2e6;
    padding: 1rem;
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
}

.quotation-theme-corporate .summary-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border: 2px solid #28a745;
}

.quotation-theme-creative {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: #ffffff;
    color: #1a202c;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 3px solid #dc3545;
}

.quotation-theme-creative .quotation-header {
    background: #ffffff;
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quotation-theme-creative .quotation-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 2rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #dc3545;
    border-bottom: 3px solid #dc3545;
    padding-bottom: 1rem;
}

.quotation-theme-creative .quotation-title::before,
.quotation-theme-creative .quotation-title::after {
    content: '★';
    color: #dc3545;
    margin: 0 1rem;
}

.quotation-theme-creative .items-table {
    border: 2px solid #dc3545;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.quotation-theme-creative .items-table th {
    background: #dc3545;
    color: #fff;
    border: 1px solid #c82333;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
}

.quotation-theme-creative .items-table td {
    border: 1px solid #dee2e6;
    padding: 1rem;
    background: #ffffff;
    color: #1a202c;
    font-weight: 500;
}

.quotation-theme-creative .summary-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    border: 2px solid #dc3545;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Form Container */
.quotation-form-container {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.page-title {
    text-align: center;
    color: #1a202c;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.form-section h2 {
    color: #1a202c;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1a202c;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Items Section */
.item-row {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.item-row:hover {
    border-color: #007bff;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.1);
}

/* Responsive item form layout */
@media (max-width: 992px) {
    .item-row .form-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .item-row .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .item-row .form-group:nth-child(5),
    .item-row .form-group:nth-child(6) {
        grid-column: span 1;
    }
}

@media (max-width: 576px) {
    .item-row .form-row {
        grid-template-columns: 1fr;
    }
    
    .item-row .form-group {
        grid-column: span 1 !important;
    }
    
    .remove-item-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}

.remove-item-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.add-item-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-item-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* Action Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #dee2e6;
}

.form-actions .btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* .form-actions  {
    background: #007bff;
    color: #fff;
} */

.form-actions .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.form-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.form-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #007bff;
    color: #fff;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #ffffff;
    border-radius: 0 0 15px 15px;
}

/* Quotation Preview Styles */
#quotationPreview {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    font-family: 'Arial', sans-serif;
    font-size: 0.75rem;
    line-height: 1.4;
    max-height: 60vh;
    overflow-y: auto;
    color: #1a202c;
}

/* Quotation Preview Content Styles */
.quotation-preview {
    font-family: 'Arial', sans-serif;
    color: #1a202c;
    line-height: 1.6;
}

/* Standard Format (Modern) Preview */
.quotation-preview.standard-format {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quotation-preview.standard-format .quote-header-bar {
    background: #007bff;
    color: #1a202c;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quotation-preview.standard-format .quote-header-bar h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.quotation-preview.standard-format .quote-number {
    font-size: 1rem;
    font-weight: 600;
}

.quotation-preview.standard-format .quote-content {
    padding: 1.5rem;
}

.quotation-preview.standard-format .company-section h3 {
    color: #007bff;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.quotation-preview.standard-format .company-section p {
    margin: 0.25rem 0;
    color: #666;
}

.quotation-preview.standard-format .quote-details {
    margin: 1rem 0;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.standard-format .detail-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quotation-preview.standard-format .detail-row:last-child {
    border-bottom: none;
}

.quotation-preview.standard-format .customer-section h4 {
    color: #007bff;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.quotation-preview.standard-format .customer-section p {
    margin: 0.25rem 0;
    color: #666;
}

.quotation-preview.standard-format .items-table {
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.quotation-preview.standard-format .table-header {
    background: #007bff;
    color: #1a202c;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    font-weight: bold;
}

.quotation-preview.standard-format .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.quotation-preview.standard-format .table-row:last-child {
    border-bottom: none;
}

.quotation-preview.standard-format .table-row:nth-child(even) {
    background: #ffffff;
}

.quotation-preview.standard-format .summary-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.standard-format .summary-display h2 {
    color: #007bff;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    text-align: center;
}

.quotation-preview.standard-format .summary-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quotation-preview.standard-format .summary-row.total-row {
    border-top: 2px solid #007bff;
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #007bff;
}

/* GST Format (Classic) Preview */
.quotation-preview.gst-format {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quotation-preview.gst-format .gst-header {
    background: #28a745;
    color: #1a202c;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quotation-preview.gst-format .gst-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.quotation-preview.gst-format .gst-header h3 {
    margin: 0;
    font-size: 1rem;
}

.quotation-preview.gst-format .gst-header p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.quotation-preview.gst-format .gst-content {
    padding: 1.5rem;
}

.quotation-preview.gst-format .billing-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.quotation-preview.gst-format .bill-from h4,
.quotation-preview.gst-format .bill-to h4 {
    color: #28a745;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.quotation-preview.gst-format .bill-from p,
.quotation-preview.gst-format .bill-to p {
    margin: 0.25rem 0;
    color: #666;
}

.quotation-preview.gst-format .gst-items {
    margin: 1.5rem 0;
}

.quotation-preview.gst-format .gst-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.quotation-preview.gst-format .gst-item:last-child {
    border-bottom: none;
}

.quotation-preview.gst-format .gst-item:nth-child(even) {
    background: #ffffff;
}

.quotation-preview.gst-format .gst-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.gst-format .summary-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quotation-preview.gst-format .summary-row.total-row {
    border-top: 2px solid #28a745;
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #28a745;
}

/* Product Image Format (Elegant) Preview */
.quotation-preview.product-format {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quotation-preview.product-format .product-header {
    background: #6f42c1;
    color: #1a202c;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quotation-preview.product-format .product-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.quotation-preview.product-format .product-header h3 {
    margin: 0;
    font-size: 1rem;
}

.quotation-preview.product-format .product-header p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.quotation-preview.product-format .product-content {
    padding: 1.5rem;
}

.quotation-preview.product-format .customer-details h4 {
    color: #6f42c1;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.quotation-preview.product-format .customer-details p {
    margin: 0.25rem 0;
    color: #666;
}

.quotation-preview.product-format .items-table {
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.quotation-preview.product-format .table-header {
    background: #6f42c1;
    color: #1a202c;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    font-weight: bold;
}

.quotation-preview.product-format .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.quotation-preview.product-format .table-row:last-child {
    border-bottom: none;
}

.quotation-preview.product-format .table-row:nth-child(even) {
    background: #ffffff;
}

.quotation-preview.product-format .product-total {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.product-format .total-amount {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-top: 2px solid #6f42c1;
    font-weight: bold;
    font-size: 1.1rem;
    color: #6f42c1;
}

/* Shipping Format (Minimal) Preview */
.quotation-preview.shipping-format {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quotation-preview.shipping-format .shipping-header {
    background: #6c757d;
    color: #1a202c;
    padding: 1rem;
    text-align: center;
}

.quotation-preview.shipping-format .shipping-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.quotation-preview.shipping-format .quote-ref {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.quotation-preview.shipping-format .shipping-content {
    padding: 1.5rem;
}

.quotation-preview.shipping-format .address-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.quotation-preview.shipping-format .from-address h4,
.quotation-preview.shipping-format .to-address h4 {
    color: #ccc;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.quotation-preview.shipping-format .from-address p,
.quotation-preview.shipping-format .to-address p {
    margin: 0.25rem 0;
    color: #666;
}

.quotation-preview.shipping-format .shipping-details {
    margin: 1rem 0;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.shipping-format .detail-item {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quotation-preview.shipping-format .detail-item:last-child {
    border-bottom: none;
}

.quotation-preview.shipping-format .items-table {
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.quotation-preview.shipping-format .table-header {
    background: #6c757d;
    color: #1a202c;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    font-weight: bold;
}

.quotation-preview.shipping-format .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.quotation-preview.shipping-format .table-row:last-child {
    border-bottom: none;
}

.quotation-preview.shipping-format .table-row:nth-child(even) {
    background: #ffffff;
}

.quotation-preview.shipping-format .shipping-total {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.shipping-format .total-line {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quotation-preview.shipping-format .total-line.final {
    border-top: 2px solid #6c757d;
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #ccc;
}

/* Proposal Format (Corporate) Preview */
.quotation-preview.proposal-format {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quotation-preview.proposal-format .proposal-header {
    background: #343a40;
    color: #1a202c;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quotation-preview.proposal-format .proposal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.quotation-preview.proposal-format .proposal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.quotation-preview.proposal-format .proposal-header p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.quotation-preview.proposal-format .proposal-content {
    padding: 1.5rem;
}

.quotation-preview.proposal-format .client-section h4 {
    color: #343a40;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.quotation-preview.proposal-format .client-section p {
    margin: 0.25rem 0;
    color: #666;
}

.quotation-preview.proposal-format .items-table {
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.quotation-preview.proposal-format .table-header {
    background: #343a40;
    color: #1a202c;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    font-weight: bold;
}

.quotation-preview.proposal-format .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.quotation-preview.proposal-format .table-row:last-child {
    border-bottom: none;
}

.quotation-preview.proposal-format .table-row:nth-child(even) {
    background: #ffffff;
}

.quotation-preview.proposal-format .proposal-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
}

.quotation-preview.proposal-format .summary-section h5 {
    color: #343a40;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    text-align: center;
}

.quotation-preview.proposal-format .investment-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.quotation-preview.proposal-format .investment-row:last-child {
    border-bottom: none;
}

/* Responsive quotation preview */
@media (max-width: 768px) {
    #quotationPreview {
        padding: 0.75rem;
        font-size: 0.85rem;
        max-height: 70vh;
    }
    
    .quotation-preview {
        padding: 0.75rem;
    }
    
    .quotation-header {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .company-name {
        font-size: 1.3rem;
    }
    
    .quotation-title {
        font-size: 1.5rem;
        margin: 1rem 0;
    }
    
    .items-table {
        font-size: 0.65rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .items-table tbody,
    .items-table thead,
    .items-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

@media (max-width: 576px) {
    #quotationPreview {
        padding: 0.5rem;
        font-size: 0.65rem;
        max-height: 75vh;
    }
    
    .quotation-preview {
        padding: 0.5rem;
    }
    
    .quotation-header {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .company-name {
        font-size: 1.1rem;
    }
    
    .quotation-title {
        font-size: 1.3rem;
        margin: 0.75rem 0;
    }
    
    .items-table {
        font-size: 0.75rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 0.25rem;
    }
    
    .summary-section {
        margin-bottom: 1rem;
    }
    
    .summary-row {
        margin-bottom: 0.25rem;
        font-size: 0.65rem;
    }
}

.quotation-preview {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #1a202c;
}

.quotation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #dee2e6;
}

.company-info {
    flex: 1;
    color: #1a202c;
}

.company-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.company-slogan {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: #666;
}

.company-details {
    font-size: 0.65rem;
    line-height: 1.3;
    color: #1a202c;
}

.quote-info {
    text-align: right;
    color: #1a202c;
}

.quote-number {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1a202c;
}

.quotation-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 2rem 0;
    text-transform: uppercase;
    color: #1a202c;
}

.customer-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.quote-to, .ship-to {
    flex: 1;
    margin: 0 1rem;
    color: #1a202c;
}

.section-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    color: #1a202c;
}

.underline {
    border-bottom: 1px solid #333;
    min-height: 1.5rem;
    margin-bottom: 1rem;
}

.shipping-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.shipping-table th,
.shipping-table td {
    border: 1px solid #333;
    padding: 0.5rem;
    text-align: center;
    color: #1a202c;
}

.shipping-table th {
    background-color: #f0f0f0;
    font-weight: bold;
    color: #1a202c;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.items-table th,
.items-table td {
    border: 1px solid #333;
    padding: 0.5rem;
    text-align: left;
    color: #1a202c;
}

.items-table th {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: center;
    color: #1a202c;
}

.sub-description {
    font-size: 0.65rem;
    font-style: italic;
    padding-left: 1rem;
    color: #666;
}

.summary-section {
    text-align: right;
    margin-bottom: 2rem;
    color: #1a202c;
}

.summary-display {
    margin-top: 2rem;
}

.summary-display h2 {
    color: #1a202c;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.summary-display .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-display .summary-row:last-child {
    border-top: 2px solid #007bff;
    border-bottom: none;
    margin-top: 12px;
    padding-top: 16px;
}

.summary-display .summary-row span:first-child {
    color: #1a202c;
    font-weight: 500;
}

.summary-display .summary-row span:last-child {
    color: #007bff;
    font-weight: 600;
    font-size: 16px;
}

.summary-display .summary-row:last-child span:last-child {
    color: #1a202c;
    font-size: 18px;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.25rem;
    color: #1a202c;
}

.summary-label {
    font-weight: bold;
    color: #1a202c;
}

.notes-section {
    margin-bottom: 2rem;
    color: #1a202c;
}

/* Quotation Preview Notes Section */
.quotation-preview .notes-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.quotation-preview .notes-section h4 {
    color: #007bff;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: bold;
}

.quotation-preview .notes-section p {
    margin: 0;
    color: #666;
    line-height: 1.5;
    white-space: pre-wrap;
}

.signature-section {
    margin-top: 3rem;
    color: #1a202c;
}

.signature-line {
    border-bottom: 1px solid #333;
    min-height: 2rem;
    margin-top: 1rem;
}

.page-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #1a202c;
}

/* Enhanced Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .quotation-form-container {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .form-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .form-section h2 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    .customer-info {
        flex-direction: column;
    }
    
    .quote-to, .ship-to {
        margin: 0 0 1rem 0;
    }
    
    .quotation-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .quote-info {
        text-align: left;
    }
    
    /* Responsive table for items */
    .items-table {
        font-size: 0.85rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 0.4rem;
    }
    
    /* Better item row layout */
    .item-row {
        padding: 0.75rem;
    }
    
    .item-row .form-row {
        gap: 0.5rem;
    }
    
    .remove-item-btn {
        width: 30px;
        height: 30px;
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .quotation-form-container {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .page-subtitle {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .form-section h2 {
        font-size: 1.1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.6rem;
        font-size: 0.75rem;
    }
    
    .form-actions .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.75rem;
    }
    
    .add-item-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
        border-radius: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .close {
        font-size: 1.5rem;
    }
    
    /* Smaller tables for mobile */
    .items-table {
        font-size: 0.65rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 0.3rem;
    }
    
    /* Stack form elements on very small screens */
    .form-group input,
    .form-group textarea {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .item-row {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .remove-item-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    /* Summary display improvements */
    .summary-display .summary-row {
        padding: 8px 0;
        font-size: 0.75rem;
    }
    
    .summary-display .summary-row span:last-child {
        font-size: 0.95rem;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) and (pointer: coarse) {
    .form-actions .btn,
    .add-item-btn,
    .remove-item-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 44px;
    }
    
    .design-option {
        min-height: 44px;
    }
    
    .design-option label {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Quotation Overview Section Styles */
.quotation-overview {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.quotation-overview .overview-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.quotation-overview .overview-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    text-align: center;
}

.quotation-overview .overview-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    border-radius: 2px;
}

.quotation-overview .overview-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 1.5rem;
    text-align: justify;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.quotation-overview .overview-text:last-child {
    margin-bottom: 0;
}

/* Benefits Cards Section */
.benefits-cards-section {
    margin: 3rem 0;
}

.benefit-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e9ecef;
    min-height: 280px;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.benefit-card .card-content {
    text-align: left;
}

.benefit-card .card-icon {
    width: 60px;
    height: 60px;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.benefit-card .card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.benefit-card .card-description {
    color: #ccc;
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Features List Section */
.features-list-section {
    margin: 3rem 0;
}

.features-list-container {
    max-width: 900px;
    margin: 0 auto;
}

.feature-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-list-item:last-child {
    border-bottom: none;
}

.feature-list-item:hover {
    background: rgba(13, 110, 253, 0.02);
    border-radius: 10px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.feature-list-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.feature-list-content {
    flex: 1;
}

.feature-list-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.75rem 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
}

.feature-list-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.8rem;
    margin: 0;
}

/* Background Elements */
.quotation-overview .background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.quotation-overview .shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(0, 86, 179, 0.05));
    animation: float 6s ease-in-out infinite;
}

.quotation-overview .shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.quotation-overview .shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.quotation-overview .shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .quotation-overview {
        padding: 60px 0;
    }
    
    .quotation-overview .overview-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .quotation-overview .overview-text {
        font-size: 0.8rem;
        line-height: 1.6;
        text-align: left;
    }
    
    .quotation-overview .overview-content {
        padding: 0 15px;
    }
    
    .benefit-card {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        min-height: 250px;
    }
    
    .benefit-card .card-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .benefit-card .card-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .benefit-card .card-description {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .feature-list-item {
        gap: 1rem;
        padding: 1.25rem 0;
    }
    
    .feature-list-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .feature-list-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-list-description {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}

@media (max-width: 576px) {
    .quotation-overview {
        padding: 40px 0;
    }
    
    .quotation-overview .overview-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .quotation-overview .overview-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .quotation-overview .shape {
        display: none;
    }
    
    .benefit-card {
        padding: 1rem;
        margin-bottom: 1rem;
        min-height: 220px;
    }
    
    .benefit-card .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .benefit-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .benefit-card .card-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .feature-list-item {
        gap: 0.75rem;
        padding: 1rem 0;
    }
    
    .feature-list-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .feature-list-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-list-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

/* Responsive Layout for New Design */
@media (max-width: 1200px) {
    .layout-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .template-nav-section {
        flex: none;
        width: 100%;
        max-width: none;
    }
    
    .template-nav-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
    }
    
    .template-nav-item {
        flex-shrink: 0;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .app-header h1 {
        font-size: 2rem;
    }
    
    .app-header p {
        font-size: 1rem;
    }
    
    .template-nav-section {
        padding: 15px;
    }
    
    .template-nav-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .template-nav-item {
        min-width: auto;
        padding: 12px;
    }
    
    .template-nav-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .template-nav-info h4 {
        font-size: 0.85rem;
    }
    
    .template-nav-info p {
        font-size: 0.75rem;
    }
    
    .editable-preview-section {
        margin-top: 0;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .preview-actions {
        justify-content: center;
    }
    
    .editable-preview {
        padding: 20px;
        min-height: 500px;
    }
    
    .template-tools-section .tool-buttons {
        gap: 6px;
    }
    
    .template-tools-section .btn-tool {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .app-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .app-header h1 {
        font-size: 1.8rem;
    }
    
    .template-nav-section {
        padding: 10px;
    }
    
    .template-nav-item {
        padding: 10px;
    }
    
    .template-nav-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .editable-preview {
        padding: 15px;
        min-height: 400px;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-preview-generate,
    .btn-preview-download {
        width: 100%;
        padding: 12px;
    }
}

/* ========================================
   QUOTATION FORMAT STYLES
   ======================================== */

/* Modern Format Styles */
.format-modern {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 800px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Ensure all text in modern header is white */
.modern-header * {
    color: #ffffff !important;
}

.modern-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modern-logo-placeholder {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.modern-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.modern-company-info {
    text-align: right;
}

.modern-company-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    background: transparent;
    border: none;
    color: #ffffff !important;
    text-align: right;
}

.modern-company-address {
    font-size: 14px;
    opacity: 0.9;
    background: transparent;
    border: none;
    color: #ffffff !important;
    text-align: right;
}

/* Placeholder colors for better contrast on dark header */
.modern-company-name::placeholder,
.modern-company-address::placeholder {
    color: rgba(255, 255, 255, 0.9) !important;
}

.modern-meta-section {
    padding: 25px 30px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.modern-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.modern-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 12px;
    color: #ccc;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    background: transparent;
    border: none;
    padding: 0;
}

.modern-parties-section {
    padding: 25px 30px;
    background: #ffffff;
}

.modern-customer h4 {
    font-size: 16px;
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.party-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.party-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-label {
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
    min-width: 120px;
}

.field-value {
    flex: 1;
    font-size: 14px;
    color: #1a202c;
    background: transparent;
    border: none;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.modern-items-section {
    padding: 25px 30px;
    background: #ffffff;
}

.modern-items-section h4 {
    font-size: 16px;
    color: #495057;
    margin-bottom: 20px;
    font-weight: 600;
}

.items-table {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    background: #ffffff;
    padding: 15px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row input {
    background: transparent;
    border: none;
    font-size: 14px;
    color: #1a202c;
    padding: 5px;
    width: 100%;
}

.modern-summary-section {
    padding: 25px 30px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.summary-row.total-row {
    font-weight: 600;
    font-size: 16px;
    color: #495057;
    border-top: 2px solid #667eea;
    margin-top: 10px;
    padding-top: 15px;
}

.modern-notes-section {
    padding: 25px 30px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
}

.notes-group,
.terms-group {
    margin-bottom: 20px;
}

.notes-group h4,
.terms-group h4 {
    font-size: 14px;
    color: #495057;
    margin-bottom: 10px;
    font-weight: 600;
}

.notes-textarea,
.terms-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    color: #1a202c;
    background: #ffffff;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.notes-textarea:focus,
.terms-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Classic Format Styles */
.format-classic {
    background: #ffffff;
    border: 2px solid #333;
    font-family: 'Times New Roman', serif;
    color: #1a202c;
    min-height: 800px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.classic-header {
    background: #f5f5f5;
    padding: 25px;
    border-bottom: 2px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.classic-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.classic-logo-placeholder {
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
}

.classic-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.classic-company-info {
    text-align: right;
}

.classic-company-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    background: transparent;
    border: none;
    color: #1a202c;
    text-align: right;
}

.classic-company-address {
    font-size: 14px;
    background: transparent;
    border: none;
    color: #1a202c;
    text-align: right;
}

.classic-meta-section {
    padding: 20px 25px;
    background: #ffffff;
    border-bottom: 1px solid #333;
}

.classic-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.classic-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.classic-parties-section {
    padding: 20px 25px;
    background: #ffffff;
}

.classic-customer h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.classic-items-section {
    padding: 20px 25px;
    background: #ffffff;
}

.classic-items-section h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.classic-summary-section {
    padding: 20px 25px;
    background: #f5f5f5;
    border-top: 2px solid #333;
}

/* Elegant Format Styles */
.format-elegant {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Georgia', serif;
    color: #1a202c;
    min-height: 800px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.elegant-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    flex-direction: row-reverse;
}

/* Ensure all text in elegant header is white */
.elegant-header * {
    color: #ffffff !important;
}

.elegant-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #e74c3c;
}

.elegant-left-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 1;
}

.elegant-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.elegant-logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.elegant-logo-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.elegant-title {
    font-size: 28px;
    font-weight: 300;
    margin: 0;
    letter-spacing: 2px;
    text-align: right;
}

.elegant-company-info {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* Elegant Template User-Friendly UI Enhancements */
.elegant-input-group {
    position: relative;
    margin-bottom: 12px;
    width: 100%;
}

.elegant-input {
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 8px 12px;
    width: 100%;
    direction: ltr;
    unicode-bidi: normal;
}

.elegant-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1) !important;
}

.elegant-input:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.elegant-edit-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.elegant-input-group:hover .elegant-edit-icon {
    opacity: 1;
}

.elegant-edit-icon:hover {
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.elegant-meta-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.elegant-meta-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.elegant-label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.elegant-meta-input {
    position: relative;
}

.elegant-meta-field {
    width: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    text-align: center;
    direction: ltr;
}

.elegant-meta-field:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.elegant-meta-field:hover {
    border-color: #bdc3c7;
}

.elegant-meta-edit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.elegant-meta-input:hover .elegant-meta-edit {
    opacity: 1;
}

.elegant-meta-edit:hover {
    color: #3498db;
    transform: translateY(-50%) scale(1.1);
}

.elegant-company-name {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    color: #ffffff;
    text-align: left;
    letter-spacing: 1px;
    width: 100%;
    direction: ltr;
    unicode-bidi: normal;
}

.elegant-company-address {
    font-size: 14px;
    opacity: 0.9;
    background: transparent;
    border: none;
    color: #ffffff;
    text-align: left;
    font-style: italic;
    width: 100%;
    direction: ltr;
    unicode-bidi: normal;
}

.elegant-meta-section {
    padding: 30px 35px;
    background: #ecf0f1;
}

.elegant-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.elegant-meta-item {
    text-align: left;
    padding: 15px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.elegant-parties-section {
    padding: 30px 35px;
    background: #ffffff;
}

.elegant-customer h4 {
    font-size: 18px;
    color: #1a202c;
    margin-bottom: 20px;
    font-weight: 300;
    text-align: center;
    position: relative;
}

.elegant-customer h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #e74c3c;
}

.elegant-items-section {
    padding: 30px 35px;
    background: #ffffff;
}

.elegant-items-section h4 {
    font-size: 18px;
    color: #1a202c;
    margin-bottom: 25px;
    font-weight: 300;
    text-align: center;
    position: relative;
}

.elegant-items-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #e74c3c;
}

.elegant-summary-section {
    padding: 30px 35px;
    background: #ecf0f1;
    border-top: 1px solid #bdc3c7;
}

/* Minimal Format Styles */
.format-minimal {
    background: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #1a202c;
    border: 1px solid #ddd;
    min-height: 800px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.minimal-header {
    padding: 30px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.minimal-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.minimal-logo-placeholder {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
}

.minimal-title {
    font-size: 24px;
    font-weight: 300;
    margin: 0;
    color: #1a202c;
}

.minimal-company-info {
    margin-top: 15px;
}

.minimal-company-name {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 5px;
    background: transparent;
    border: none;
    color: #1a202c;
    text-align: center;
}

.minimal-company-address {
    font-size: 14px;
    color: #666;
    background: transparent;
    border: none;
    text-align: center;
}

.minimal-meta-section {
    padding: 25px 30px;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
}

.minimal-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.minimal-meta-item {
    text-align: left;
}

.minimal-parties-section {
    padding: 25px 30px;
    background: #ffffff;
}

.minimal-customer h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 15px;
    font-weight: 400;
}

.minimal-items-section {
    padding: 25px 30px;
    background: #ffffff;
}

.minimal-items-section h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 20px;
    font-weight: 400;
}

.minimal-summary-section {
    padding: 25px 30px;
    background: #ffffff;
    border-top: 1px solid #ddd;
}

/* Corporate Format Styles */
.format-corporate {
    background: #ffffff;
    font-family: 'Arial', sans-serif;
    color: #1a1a1a;
    border: 3px solid #1a1a1a;
    min-height: 800px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.corporate-header {
    background: #f8f9fa;
    color: #1a202c;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.corporate-logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.corporate-logo-placeholder {
    width: 70px;
    height: 70px;
    background: #e9ecef;
    border: 2px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
}

.corporate-title {
    font-size: 26px;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.corporate-company-info {
    text-align: right;
}

.corporate-company-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    background: transparent;
    border: none;
    color: #1a202c;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.corporate-company-address {
    font-size: 14px;
    background: transparent;
    border: none;
    color: #ccc;
    text-align: right;
}

.corporate-meta-section {
    padding: 25px;
    background: #f0f0f0;
    border-bottom: 2px solid #1a1a1a;
}

.corporate-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.corporate-meta-item {
    text-align: left;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #ddd;
}

.corporate-parties-section {
    padding: 25px;
    background: #ffffff;
}

.corporate-customer h4 {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
}

.corporate-items-section {
    padding: 25px;
    background: #ffffff;
}

.corporate-items-section h4 {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
}

.corporate-summary-section {
    padding: 25px;
    background: #f0f0f0;
    border-top: 2px solid #1a1a1a;
}

/* Responsive adjustments for all formats */
@media (max-width: 768px) {
    .modern-meta-grid,
    .classic-meta-grid,
    .elegant-meta-grid,
    .minimal-meta-grid,
    .corporate-meta-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modern-header,
    .classic-header,
    .elegant-header,
    .minimal-header,
    .corporate-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .party-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .field-label {
        min-width: auto;
    }
}

/* Add Item Button Styling */
.btn-add-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-item:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-add-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Format-specific button variations */
.elegant-add-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #8b5cf6 100%);
    border-radius: 12px;
    font-style: italic;
}

.elegant-add-btn:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
}

.minimal-add-btn {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-radius: 4px;
    font-weight: 500;
}

.minimal-add-btn:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.corporate-add-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 6px;
    font-weight: 700;
}

.corporate-add-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

/* Responsive button styling */
@media (max-width: 768px) {
    .btn-add-item {
        padding: 10px 20px;
        font-size: 0.85rem;
        margin-top: 12px;
    }
}

@media (max-width: 576px) {
    .btn-add-item {
        padding: 8px 16px;
        font-size: 0.8rem;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* Ensure Corporate company name/address render fully in preview and PDF */
.format-corporate .corporate-company-name,
.format-corporate .corporate-company-address {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 200px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    padding: 6px 10px !important;
}

@media print {
    .format-corporate .corporate-company-name,
    .format-corporate .corporate-company-address {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 200px !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
        background: transparent !important;
        border: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

