/* 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;
}

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

/* Header Styles */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    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;
}

@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;
    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 {
    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-nav-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

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

.template-nav-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    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:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

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

.template-nav-item.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f2ff 0%, #e6f3ff 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

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

.template-nav-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    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-item:hover .template-nav-icon::before {
    opacity: 1;
}

.modern-icon {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
}

.classic-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.elegant-icon {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.minimal-icon {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
}

.corporate-icon {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
}

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

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

.template-nav-info p {
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 400;
}

/* Tools Section */
.template-tools-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.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 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.template-tools-section .btn-tool {
    background: #6c757d;
    color: #1a202c;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-tools-section .btn-tool:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.template-tools-section .btn-tool.has-data {
    background: #28a745;
    position: relative;
}

.template-tools-section .btn-tool.has-data:hover {
    background: #218838;
}

.template-tools-section .btn-tool.has-data::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ffc107;
    border-radius: 50%;
    border: 2px solid white;
}

.template-tools-section .btn-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.template-tools-section .old-data-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.template-tools-section .old-data-group .btn-tool {
    flex: 1;
}

.template-tools-section .btn-clear {
    background: #dc3545;
    color: #1a202c;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-tools-section .btn-clear:hover {
    background: #dc3545;
}

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

.template-tools-section .currency-select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #1a202c;
    transition: border-color 0.3s ease;
    width: 100%;
}

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

.template-tools-section .logo-upload-container {
    width: 100%;
    position: relative;
    min-height: 120px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.template-tools-section .logo-upload-container:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

/* Completely hide all file input elements and their buttons */
.template-tools-section input[type="file"],
.template-tools-section .logo-upload-input,
input[type="file"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    z-index: -1 !important;
}

/* Hide all file input buttons in all browsers */
.template-tools-section input[type="file"]::-webkit-file-upload-button,
.template-tools-section input[type="file"]::file-selector-button,
.template-tools-section input[type="file"]::-moz-file-upload-button,
input[type="file"]::-webkit-file-upload-button,
input[type="file"]::file-selector-button,
input[type="file"]::-moz-file-upload-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    border: none !important;
    background: transparent !important;
}

/* Additional aggressive hiding for any remaining file inputs */
*[type="file"],
input[type="file"],
.logo-upload-input,
.template-tools-section .logo-upload-input {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    z-index: -9999 !important;
}

/* Hide any file input labels or text */
.template-tools-section label[for*="file"],
.template-tools-section .file-input-label {
    display: none !important;
}

/* Hide any text that appears after file inputs - but not the logo container */
.template-tools-section input[type="file"] + *:not(.logo-preview):not(.logo-placeholder),
.template-tools-section .logo-upload-input + *:not(.logo-preview):not(.logo-placeholder) {
    display: none !important;
}

/* Don't hide the logo upload container and related elements */
.template-tools-section .logo-upload-container,
.template-tools-section .tool-group:has(.logo-upload-container),
.template-tools-section .tool-group:has(h3:contains("Company Logo")) {
    display: block !important;
    visibility: visible !important;
}

/* Ensure the Company Logo heading is visible */
.template-tools-section h3:contains("Company Logo") {
    display: block !important;
    visibility: visible !important;
}

/* Force visibility for Company Logo section */
.template-tools-section .tool-group:last-child {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Make sure all elements in the logo section are visible */
.template-tools-section .tool-group:last-child * {
    display: block !important;
    visibility: visible !important;
}

.template-tools-section .tool-group:last-child .logo-placeholder {
    display: flex !important;
    visibility: visible !important;
}

/* Additional rule to ensure file inputs are hidden */
.template-tools-section input[type="file"] {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    z-index: -9999 !important;
}

.template-tools-section .logo-preview {
    position: relative;
    padding: 10px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    min-height: 80px;
    max-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.template-tools-section .logo-preview-img {
    max-width: 100%;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.template-tools-section .btn-remove {
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 0.8rem;
    background: #ff4444;
    color: #1a202c;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.template-tools-section .btn-remove:hover {
    background: #dc3545;
}

.template-tools-section .logo-placeholder {
    padding: 20px;
    text-align: center;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.template-tools-section .logo-placeholder:hover {
    background: rgba(102, 126, 234, 0.05);
}

.template-tools-section .logo-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #667eea;
}

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



/* Editable Preview Section */
.editable-preview-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    flex: 1;
    height: fit-content;
    margin-bottom: 32px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.editable-preview-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

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

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

.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-generate:hover::before {
    left: 100%;
}

.btn-preview-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.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:hover::before {
    left: 100%;
}

.btn-preview-download:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(40, 167, 69, 0.4);
}

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

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

.editable-preview:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

.editable-field:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

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

.editable-field::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Modern Template Styles - Clean Invoice Design */
.format-modern {
    background: #f8f8f8;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 25px;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a202c;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

/* Remove animated top bar for clean design */

.modern-teal-header {
    background: #f0f0f0;
    color: #1a202c;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid #c0c0c0;
}

/* Remove decorative elements for clean design */

.modern-logo-section {
    flex: 1;
}

.modern-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a202c;
    letter-spacing: -0.3px;
}

.modern-company-details {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

.modern-quotation-number {
    text-align: right;
    flex: 0 0 200px;
}

.modern-quotation-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modern-due-date {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0;
}

.modern-quotation-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #1a202c;
}

/* Client Details Section */
.modern-client-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
    border: 1px solid #c0c0c0;
}

.modern-billed-to {
    flex: 1;
}

.modern-billed-to h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.modern-client-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.modern-client-email {
    font-size: 0.9rem;
    color: #ccc;
}

.modern-invoice-details {
    flex: 1;
    text-align: center;
}

.modern-invoice-number {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.modern-invoice-date {
    font-size: 0.9rem;
    color: #ccc;
}

/* Total Due Highlight */
.modern-total-due {
    flex: 0 0 160px;
    text-align: right;
    background: #ffeb3b;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #1a1a1a;
}

.modern-total-due-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
}

.modern-total-due-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
    margin-top: 5px;
}

.modern-quotation-line {
    height: 2px;
    background: white;
    margin: 8px 0;
    opacity: 0.7;
}

.modern-body-section {
    padding: 20px;
    display: flex;
    gap: 30px;
}

.modern-supplier-section h4 {
    color: #1a202c;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.modern-detail-section h4 {
    color: #1a202c;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

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

.detail-label {
    font-weight: 600;
    color: #ccc;
}

.detail-input {
    text-align: right;
    font-weight: 600;
}

.modern-items-table {
    padding: 20px;
}

.modern-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #c0c0c0;
}

.modern-items th {
    background: #ffeb3b;
    color: #1a202c;
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: 1px solid #1a1a1a;
}

.modern-items td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #d0d0d0;
    background: #f0f0f0;
    border: 1px solid #c0c0c0;
}


.modern-items td input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px;
    font-family: inherit;
    font-size: inherit;
}

.btn-add-item {
    background: #667eea;
    color: #1a202c;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.btn-add-item:hover {
    background: #5a67d8;
}

.modern-footer-section {
    padding: 15px;
    display: flex;
    gap: 20px;
    background: #f0f0f0;
    border-radius: 6px;
    border: 1px solid #c0c0c0;
    margin-top: 15px;
}

/* Payment Info Section */
.modern-payment-info {
    flex: 1;
    background: #f0f0f0;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c0c0c0;
}

.modern-payment-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 10px;
}

.modern-payment-details {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

/* Signature Section */
.modern-signature-section {
    flex: 1;
    text-align: center;
}

.modern-signature-line {
    border-bottom: 1px solid #1a1a1a;
    width: 200px;
    margin: 0 auto 5px;
    height: 40px;
}

.modern-signature-name {
    font-size: 0.9rem;
    color: #1a202c;
    margin-bottom: 2px;
}

.modern-signature-title {
    font-size: 0.8rem;
    color: #ccc;
}

/* Terms Section */
.modern-terms-section {
    margin-top: 15px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
    border: 1px solid #c0c0c0;
}

.modern-terms-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.modern-terms-text {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
}

.modern-notes-section {
    flex: 1;
}

.modern-notes-section h4 {
    color: #1a202c;
    margin-bottom: 10px;
}

.modern-notes-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px;
    font-family: inherit;
    resize: vertical;
}

.modern-summary-section {
    flex: 0 0 250px;
    background: #f0f0f0;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c0c0c0;
}

.modern-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.modern-summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    background: #ffeb3b;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    color: #1a202c;
}

.summary-input {
    width: 80px;
    text-align: right;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
}

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

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1a202c;
    padding: 80px 40px;
    text-align: center;
    margin: 60px 0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.cta-content h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-content .btn {
    background: white;
    color: #667eea;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Who We Serve Section */
.who-we-serve-section {
    padding: 80px 0;
    background: #fafbfc;
    position: relative;
}

.who-we-serve-section .container {
    padding: 0 40px;
}

.who-we-serve-section .col-lg-4 {
    margin-bottom: 40px;
    padding: 0 15px;
}

.serve-header {
    text-align: center;
    margin-bottom: 60px;
}

.serve-title {
    font-size: 2.8rem;
    color: #1a365d;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.serve-subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

.serve-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.serve-card::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;
}

.serve-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.serve-card:hover::before {
    opacity: 1;
}

.serve-icon {
    font-size: 3.5rem;
    margin-bottom: 30px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.serve-card h4 {
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.serve-card p {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

/* Services Overview Section */
.services-overview {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.services-overview .container {
    padding: 0 40px;
}

.services-overview .col-lg-4 {
    margin-bottom: 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.services-overview-title {
    font-size: 2.8rem;
    color: #1a365d;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.services-overview-subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.service-card::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;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.card-title {
    color: #1a202c;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.service-card p {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

.service-features {
    list-style: none;
    padding: 0;
    text-align: left;
}

.service-features li {
    color: #667eea;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.service-features li:before {
    content: "✓";
        position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Why Choose Us Section */
.why-choose-us-section {
    padding: 80px 0;
    background: white;
    position: relative;
}

.why-choose-us-section .container {
    padding: 0 40px;
}

.why-choose-us-section .col-lg-4 {
    margin-bottom: 30px;
}

.choose-header {
    text-align: center;
    margin-bottom: 60px;
}

.choose-title {
    font-size: 2.8rem;
    color: #1a365d;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.choose-subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

.choose-item {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.choose-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;
}

.choose-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.choose-item:hover::before {
    opacity: 1;
}

.item-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.item-heading {
    color: #1a202c;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.item-description {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

/* Testimonials Section */
#testimonials {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

#testimonials .container {
    padding: 0 40px;
}

#testimonials .col-lg-4 {
    margin-bottom: 30px;
}

.testimonials-title {
    font-size: 2.8rem;
    color: #1a365d;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.testimonial-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.testimonial-card::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;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.testimonial-card:hover::before {
    opacity: 1;
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    color: #1a202c;
    font-style: italic;
    line-height: 1.6;
    font-size: 1.1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-info {
    flex: 1;
}

.testimonial-name {
    color: #1a202c;
    margin-bottom: 5px;
    font-weight: 600;
}

.testimonial-company {
    color: #6c757d;
        margin: 0;
    }
    
/* FAQs Section */
#faqs {
    padding: 80px 0;
    background: #f5f7fa;
    position: relative;
}

#faqs .container {
    padding: 0 40px;
}

#faqs .faqs-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1a365d;
    letter-spacing: -0.5px;
}

.faqs-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-item {
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
    background: transparent;
}

.faq-question:hover {
    background: transparent;
}

.faq-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #3b82f6;
    min-width: 30px;
    margin-right: 16px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.faq-text {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
    color: #1a202c;
    line-height: 1.4;
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: 400;
    color: #3b82f6;
    transition: all 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 24px 20px 24px;
}

.faq-answer p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.faq-item.active .faq-icon {
    color: #3b82f6;
    transform: rotate(45deg);
}

.faq-item.active .faq-question {
    background: #e2e8f0;
}

.faq-item.active {
    background: #e2e8f0;
    transform: none;
}

/* ========================================
   CLASSIC TEMPLATE STYLES
   ======================================== */
.format-classic {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    font-family: 'Times New Roman', serif;
    color: #1a202c;
}

.classic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 3px solid #2c3e50;
    padding-bottom: 20px;
}

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

.classic-logo-placeholder {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ccc;
}

.classic-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.classic-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1a202c;
    text-align: center;
}

.classic-company-info {
    text-align: right;
    flex: 1;
    margin-left: 30px;
}

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

.classic-company-address,
.classic-company-phone {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 3px;
    border: none;
    background: transparent;
    text-align: right;
    width: 100%;
}

.classic-meta-section {
    margin-bottom: 25px;
}

.classic-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: #ffffff;
    padding: 15px;
    border-radius: 5px;
}

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

.meta-label {
    font-weight: bold;
    color: #1a202c;
    font-size: 0.9rem;
}

.meta-input {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.classic-parties-section {
    margin-bottom: 25px;
}

.classic-supplier h4 {
    color: #1a202c;
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

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

.party-field {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 3px;
    font-size: 0.9rem;
}

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

.classic-items-table th {
    background: #2c3e50;
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    font-size: 0.9rem;
}

.classic-items-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

.classic-items-table input {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 3px;
    width: 100%;
    font-size: 0.85rem;
}

.classic-summary-section {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.classic-summary-left {
    flex: 1;
}

.classic-summary-right {
    flex: 1;
}

.notes-section h4 {
    color: #1a202c;
    margin-bottom: 10px;
    font-size: 1rem;
}

.classic-notes-textarea {
    width: 100%;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 3px;
    font-size: 0.9rem;
    resize: vertical;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.summary-row.total-row {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 2px solid #2c3e50;
    margin-top: 10px;
    padding-top: 15px;
}

.summary-input {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 3px;
    width: 80px;
    text-align: right;
    font-size: 0.9rem;
}

/* ========================================
   ELEGANT TEMPLATE STYLES
   ======================================== */
.format-elegant {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: #2c2c2c;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.elegant-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.elegant-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.elegant-logo-section {
    margin-bottom: 20px;
}

.elegant-logo-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #1a202c;
    font-weight: bold;
    font-size: 1.2rem;
}

.elegant-logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
}

.elegant-title-section {
    margin-bottom: 20px;
}

.elegant-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-family: 'Arial', 'Helvetica', sans-serif;
    text-transform: uppercase;
}

.elegant-subtitle {
    font-size: 0.9rem;
    color: #666666;
    font-style: normal;
    font-weight: 400;
    text-transform: lowercase;
}

.elegant-company-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.elegant-company-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c2c2c;
    border: none;
    background: transparent;
    font-family: 'Arial', 'Helvetica', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
}

.elegant-company-address,
.elegant-company-phone {
    font-size: 0.95rem;
    color: #6c757d;
    border: none;
    background: transparent;
    text-align: center;
    width: 100%;
}

.elegant-quotation-info {
    margin-bottom: 40px;
}

.elegant-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.elegant-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elegant-info-item label {
    font-weight: 600;
    color: #1a202c;
    font-size: 0.9rem;
}

.elegant-input {
    border: 2px solid #e9ecef;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.elegant-input:focus {
    border-color: #667eea;
    outline: none;
}

.elegant-supplier-section {
    margin-bottom: 40px;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.elegant-section-title {
    color: #2c2c2c;
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elegant-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #2c2c2c;
}

.elegant-supplier-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.elegant-supplier-name,
.elegant-supplier-company,
.elegant-supplier-address,
.elegant-supplier-phone {
    border: 2px solid #e9ecef;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.elegant-supplier-name:focus,
.elegant-supplier-company:focus,
.elegant-supplier-address:focus,
.elegant-supplier-phone:focus {
    border-color: #667eea;
    outline: none;
}

.elegant-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.elegant-items-table th {
    background: #f0f0f0;
    color: #2c2c2c;
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
}

.elegant-items-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    background: white;
}

.elegant-items-table input {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 5px 0;
    width: 100%;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
    background: transparent;
    color: #2c2c2c;
}

.elegant-items-table input:focus {
    border-bottom-color: #2c2c2c;
    outline: none;
}

.elegant-add-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #1a202c;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.elegant-add-btn:hover {
    transform: translateY(-2px);
}

.elegant-footer-section {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.elegant-notes-section {
    flex: 1;
}

.elegant-notes-section h4 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.elegant-notes-textarea {
    width: 100%;
    border: 2px solid #e9ecef;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.elegant-notes-textarea:focus {
    border-color: #667eea;
    outline: none;
}

.elegant-summary-section {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.elegant-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #2c2c2c;
}

.elegant-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c2c2c;
    border-top: 2px solid #2c2c2c;
    margin-top: 10px;
    background: #f0f0f0;
    margin: 10px -20px 0 -20px;
    padding: 12px 20px;
}

.elegant-summary-input {
    border: 2px solid #e9ecef;
    padding: 5px;
    border-radius: 6px;
    width: 80px;
    text-align: right;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.elegant-summary-input:focus {
    border-color: #667eea;
    outline: none;
}

/* ========================================
   MINIMAL TEMPLATE STYLES
   ======================================== */
.format-minimal {
    background: #f5f3f0;
    border: 1px solid #d4c4b0;
    border-radius: 12px;
    padding: 40px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #3a2f2a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 125, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 125, 107, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 125, 107, 0.06) 0%, transparent 50%);
}

.minimal-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.minimal-title-section {
    margin-bottom: 40px;
}

.minimal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3a2f2a;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-family: 'Arial', 'Helvetica', sans-serif;
    text-transform: uppercase;
}

.minimal-company-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.minimal-company-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: #3a2f2a;
    border: none;
    background: transparent;
    font-family: 'Georgia', 'Times New Roman', serif;
    text-align: center;
    width: 100%;
}

.minimal-company-address,
.minimal-company-phone {
    font-size: 0.9rem;
    color: #6c757d;
    border: none;
    background: transparent;
    text-align: center;
    width: 100%;
}

.minimal-quotation-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.minimal-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.minimal-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.minimal-input {
    border: none;
    border-bottom: 1px solid #e1e5e9;
    padding: 5px 0;
    font-size: 0.9rem;
    text-align: center;
    background: transparent;
    transition: border-color 0.3s ease;
}

.minimal-input:focus {
    border-bottom-color: #2c3e50;
    outline: none;
}

.minimal-supplier-section {
    margin-bottom: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(212, 196, 176, 0.3);
}

.minimal-section-title {
    color: #3a2f2a;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.minimal-supplier-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.minimal-supplier-name,
.minimal-supplier-company,
.minimal-supplier-address {
    border: none;
    border-bottom: 1px solid #e1e5e9;
    padding: 8px 0;
    font-size: 0.9rem;
    text-align: center;
    background: transparent;
    transition: border-color 0.3s ease;
}

.minimal-supplier-name:focus,
.minimal-supplier-company:focus,
.minimal-supplier-address:focus {
    border-bottom-color: #2c3e50;
    outline: none;
}

.minimal-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.minimal-items-table th {
    background: #3a2f2a;
    color: #f5f3f0;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #3a2f2a;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.minimal-items-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(212, 196, 176, 0.3);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.3);
}

.minimal-items-table input {
    border: none;
    border-bottom: 1px solid rgba(212, 196, 176, 0.5);
    padding: 5px 0;
    width: 100%;
    font-size: 0.85rem;
    background: transparent;
    transition: border-color 0.3s ease;
    color: #3a2f2a;
}

.minimal-items-table input:focus {
    border-bottom-color: #3a2f2a;
    outline: none;
}

.minimal-add-btn {
    background: transparent;
    color: #1a202c;
    border: 1px solid #e1e5e9;
    padding: 10px 20px;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.minimal-add-btn:hover {
    background: #2c3e50;
    color: #1a202c;
}

.minimal-summary-section {
    margin: 30px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(212, 196, 176, 0.3);
}

.minimal-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 196, 176, 0.3);
    font-size: 0.9rem;
    color: #3a2f2a;
}

.minimal-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-weight: 700;
    font-size: 1.2rem;
    color: #3a2f2a;
    border-top: 2px solid #3a2f2a;
    margin-top: 10px;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.minimal-summary-input {
    border: none;
    border-bottom: 1px solid #e1e5e9;
    padding: 5px 0;
    width: 80px;
    text-align: right;
    font-size: 0.9rem;
    background: transparent;
    transition: border-color 0.3s ease;
}

.minimal-summary-input:focus {
    border-bottom-color: #2c3e50;
    outline: none;
}

.minimal-notes-section {
    margin-top: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(212, 196, 176, 0.3);
}

.minimal-notes-section h4 {
    color: #3a2f2a;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.minimal-notes-textarea {
    width: 100%;
    max-width: 500px;
    border: 1px solid #e1e5e9;
    padding: 15px;
    border-radius: 0;
    font-size: 0.9rem;
    resize: vertical;
    background: transparent;
    transition: border-color 0.3s ease;
}

.minimal-notes-textarea:focus {
    border-color: #2c3e50;
    outline: none;
}

/* ========================================
   CORPORATE TEMPLATE STYLES
   ======================================== */
.format-corporate {
    background: white;
    border: 3px solid #2c3e50;
    border-radius: 0;
    padding: 30px;
    font-family: 'Arial', sans-serif;
    color: #1a202c;
    position: relative;
}

.format-corporate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2c3e50, #34495e, #2c3e50);
}

.corporate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 20px;
}

.corporate-logo-section {
    flex-shrink: 0;
}

.corporate-logo-placeholder {
    width: 100px;
    height: 100px;
    background: #2c3e50;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a202c;
    font-weight: bold;
    font-size: 1.1rem;
}

.corporate-logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
}

.corporate-title-section {
    flex: 1;
    text-align: center;
    margin: 0 30px;
}

.corporate-title {
    font-size: 2rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.corporate-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.corporate-company-details {
    text-align: right;
    flex-shrink: 0;
}

.corporate-company-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 5px;
    border: none;
    background: transparent;
    text-align: right;
    width: 100%;
}

.corporate-company-address,
.corporate-company-phone,
.corporate-company-email {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 3px;
    border: none;
    background: transparent;
    text-align: right;
    width: 100%;
}

.corporate-quotation-details {
    margin-bottom: 25px;
}

.corporate-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: #ffffff;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.corporate-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.corporate-detail-item label {
    font-weight: bold;
    color: #1a202c;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.corporate-input {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    background: white;
}

.corporate-supplier-section {
    margin-bottom: 25px;
}

.corporate-section-title {
    color: #1a202c;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #2c3e50;
    padding-bottom: 5px;
}

.corporate-supplier-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: #ffffff;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.corporate-supplier-name,
.corporate-supplier-company,
.corporate-supplier-address,
.corporate-supplier-phone,
.corporate-supplier-email {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    background: white;
}

.corporate-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 2px solid #2c3e50;
}

.corporate-items-table th {
    background: #2c3e50;
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.corporate-items-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.corporate-items-table input {
    border: 1px solid #ddd;
    padding: 6px;
    border-radius: 3px;
    width: 100%;
    font-size: 0.8rem;
    background: white;
}

.corporate-add-btn {
    background: #2c3e50;
    color: #1a202c;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

.corporate-add-btn:hover {
    background: #34495e;
}

.corporate-summary-section {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.corporate-summary-left {
    flex: 1;
}

.corporate-summary-right {
    flex: 1;
}

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

.corporate-notes-section h4,
.corporate-terms-section h4 {
    color: #1a202c;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.corporate-notes-textarea,
.corporate-terms-textarea {
    width: 100%;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    resize: vertical;
    background: white;
}

.corporate-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.corporate-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-weight: bold;
    font-size: 1.1rem;
    color: #1a202c;
    border-top: 2px solid #2c3e50;
    margin-top: 10px;
    background: #ffffff;
    padding-left: 10px;
    padding-right: 10px;
}

.corporate-summary-input {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 3px;
    width: 80px;
    text-align: right;
    font-size: 0.85rem;
    background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .modern-body-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .modern-footer-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cta-content h3 {
        font-size: 2rem;
    }
    
    .serve-title,
    .services-overview-title,
    .choose-title,
    .testimonials-title,
    .faqs-title {
        font-size: 2rem;
    }
    
    .serve-card,
    .service-card,
    .choose-item,
    .testimonial-card {
        margin-bottom: 20px;
    }
    
    /* Template Responsive Styles */
    .classic-header,
    .elegant-header,
    .corporate-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .classic-meta-grid,
    .elegant-info-grid,
    .corporate-details-grid {
        grid-template-columns: 1fr;
    }
    
    .elegant-footer-section,
    .classic-summary-section,
    .corporate-summary-section {
        flex-direction: column;
    }
    
    .minimal-quotation-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .corporate-supplier-details {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Premium Theme Enhancements (Typography, Colors, Buttons)
   These styles layer on top of existing templates for a
   more polished, premium look without breaking layout.
   ========================================================== */

/* Premium color system */
:root {
    --brand-primary: #5b7cfa;
    --brand-secondary: #8a5bfa;
    --brand-accent: #00c2a8;
    --brand-dark: #1f2d3d;
    --brand-muted: #6c7a89;
}

html { 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
}

/* Elevate cards/previews slightly */
.preview-quotation {
    box-shadow: 0 12px 34px rgba(31, 45, 61, 0.12);
    border-radius: 14px;
}

/* Premium header titles */
.app-header h1 {
    letter-spacing: .5px;
    color: white !important;
    font-weight: 700 !important;
}

/* Template list – premium active/hover */
.template-nav-item {
    border: 2px solid rgba(91, 124, 250, 0.12);
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.template-nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 45, 61, 0.12);
    border-color: rgba(91,124,250,.35);
}
.template-nav-item.active {
    border-color: var(--brand-primary);
    box-shadow: 0 14px 28px rgba(91, 124, 250, 0.25);
}

/* Primary actions */
.btn-preview-generate {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    border: 0;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: 0 10px 24px rgba(91, 124, 250, .25);
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-preview-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(91, 124, 250, .30);
    filter: brightness(1.03);
}

.btn-preview-download {
    background: linear-gradient(135deg, var(--brand-accent), #18d0c0);
    color: #fff;
    border: 0;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: 0 10px 24px rgba(0, 194, 168, .22);
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-preview-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 194, 168, .30);
    filter: brightness(1.03);
}

/* Table polish */
.modern-items th, .classic-items-table th, .elegant-items-table th,
.minimal-items-table th, .corporate-items-table th {
    letter-spacing: .3px;
}

/* Inputs look premium */
.editable-field {
    transition: box-shadow .15s ease, border-color .2s ease, background-color .2s ease;
}
.editable-field:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91,124,250,.15);
    border-color: var(--brand-primary) !important;
    background-color: #fff;
}

/* Notes/summary blocks subtle gradient headers */
.modern-summary-section, .elegant-summary-section, .corporate-summary-section {
    background-image: linear-gradient(180deg, rgba(91,124,250,.03), rgba(0,0,0,0));
}

/* Add premium separators */
.modern-quotation-line, .modern-customer-line {
    background-image: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

/* CTA premium polish */
.cta-section {
    background: linear-gradient(120deg, var(--brand-primary), var(--brand-secondary));
}
.cta-content .btn {
    color: var(--brand-primary);
}

/* Testimonials hover depth */
.testimonial-card:hover { box-shadow: 0 20px 40px rgba(31,45,61,.12); }


/* ========================================
   Print/PDF Enhancements
   ======================================== */
@media print {
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .app-header, .template-nav-section, .template-tools-section, .cta-section,
    .who-we-serve-section, .services-overview, .why-choose-us-section,
    #testimonials, #faqs { display: none !important; }
    .editable-preview-section { margin: 0; }
    .preview-quotation { box-shadow: none !important; border: 0 !important; }
    input, textarea { border: 0 !important; box-shadow: none !important; }
    .modern-items th, .classic-items-table th, .elegant-items-table th,
    .minimal-items-table th, .corporate-items-table th { -webkit-print-color-adjust: exact; }
}
