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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #ffffff;
    overflow-x: hidden;
    font-weight: normal;
}

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

/* 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-nav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.template-tools-section h3 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.template-tools-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

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

.template-tools-section .btn-tool {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.template-tools-section .currency-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
}

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

.template-tools-section .logo-placeholder {
    padding: 15px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #ffffff;
}

.template-tools-section .logo-upload-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

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

.template-nav-section h2 {
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 8px;
    text-align: left;
}

.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:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.template-nav-item.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.template-nav-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

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

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

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

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

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

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

.grid-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: #ccc;
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 400;
}

.format-selection-section h2 {
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 8px;
    text-align: left;
}

.format-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.format-card {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.format-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.format-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.2);
}

.format-preview {
    height: 65px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #1a202c;
    font-weight: bold;
    padding: 8px 12px;
    position: relative;
}

/* Format Preview Styles */
.commercial-preview {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

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

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

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

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

.preview-header {
    font-size: 1rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    line-height: 1.1;
}

.preview-content {
    text-align: center;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-company {
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1.2;
}

.preview-details {
    opacity: 0.9;
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1.2;
}

.format-info h3 {
    color: #1a202c;
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.format-info p {
    color: #ccc;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
}

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

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

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

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

.btn-preview-generate,
.btn-preview-download {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview-generate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1a202c;
}

.btn-preview-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-preview-download {
    background: #28a745;
    color: #1a202c;
}

.btn-preview-download:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.btn-preview-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.editable-preview {
    background: transparent !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(225, 229, 233, 0.6);
    border-radius: 12px;
    padding: 24px;
    min-height: 600px;
    overflow-y: auto;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

/* 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;
    font-weight: normal;
    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: #ccc;
    opacity: 0.7;
}

/* Specific editable field styles for different sections */
.commercial-company-name,
.commercial-company-address {
    font-weight: bold;
    font-size: 1.1rem;
}

.meta-value {
    font-weight: 600;
    text-align: right;
}

.field-value {
    font-weight: 500;
}

.summary-input {
    text-align: right;
    width: 80px;
    font-weight: 600;
}

.footer-value {
    font-weight: 500;
}

.footer-comments {
    width: 100%;
    min-height: 40px;
    resize: vertical;
}

/* Notes Section Styles */
.notes-section {
    border: 1px solid #e1e5e9;
    padding: 20px;
    background: #ffffff;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.notes-section h4 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.notes-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #fafafa;
    text-align: left;
    transition: all 0.3s ease;
}

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

.notes-textarea::placeholder {
    color: #ccc;
    font-style: italic;
}

.notes-content {
    min-height: 120px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    text-align: left;
}

/* Modern Format Notes Section */
.modern-notes-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #fafafa;
    text-align: left;
    transition: all 0.3s ease;
}

.modern-notes-textarea:focus {
    outline: none;
    border-color: #20b2aa;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

.modern-notes-textarea::placeholder {
    color: #ccc;
    font-style: italic;
}

.modern-notes-content {
    min-height: 120px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    text-align: left;
}

/* Small buttons for inline actions */
.btn-remove-small {
    background: #dc3545;
    color: #1a202c;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.btn-remove-small:hover {
    background: #c82333;
}

.btn-add-item {
    background: #28a745;
    color: #1a202c;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

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

/* Tools Section */
.tools-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-top: 20px;
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tool-group {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.tool-group h3 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

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

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

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

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

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

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

.old-data-group {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

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

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

.btn-clear:hover {
    background: #dc3545;
    transform: translateY(-1px);
}

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

.currency-select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

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

/* CTA Section */
.cta-section {
    margin-top: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    border-radius: 10px;
    color: #1a202c;
}

.cta-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.cta-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Banner Section */
.sales-invoice-banner {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sales-invoice-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
}

.sales-invoice-banner .banner-content {
    text-align: center;
    color: #1a202c;
    z-index: 2;
    position: relative;
}

.sales-invoice-banner .banner-heading {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sales-invoice-banner .banner-subtitle {
    font-size: 1.25rem;
    margin-bottom: 0;
    opacity: 0.9;
}

/* Overview Section */
.invoice-overview {
    padding: 80px 0;
    position: relative;
    background: #ffffff;
}

.invoice-overview .overview-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Background shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation: float 10s ease-in-out infinite;
}

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

/* ERP Invoice Section */
.erp-invoice-section {
    padding: 80px 0;
    background: #ffffff;
}

.erp-invoice-section .erp-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* .erp-invoice-section .erp-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;
} */

.erp-invoice-section .erp-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 3rem;
}

.feature-list {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.feature-text p {
    color: #ccc;
    margin: 0;
}

/* Demo Invoice Preview */
.invoice-preview-demo {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.demo-container h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1a202c;
}

.demo-invoice {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.demo-header {
    text-align: center;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.demo-header h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
    margin: 0;
}

.demo-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ccc;
}

.demo-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.demo-company, .demo-customer {
    flex: 1;
    font-size: 0.9rem;
}

.demo-items {
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.demo-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.demo-total {
    text-align: right;
}

.demo-summary {
    font-size: 0.9rem;
}

.demo-grand-total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0d6efd;
}

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

.who-we-serve-section .serve-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* .who-we-serve-section .serve-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;
}
 */
.who-we-serve-section .serve-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 3rem;
}

.serve-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.serve-card:hover {
    transform: translateY(-5px);
}

.serve-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.serve-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a202c;
}

.serve-card p {
    color: #ccc;
    line-height: 1.6;
}

/* Services Overview Section */
.services-overview {
    padding: 80px 0;
    background: #ffffff;
}

.services-overview .services-overview-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* 
.services-overview .services-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;
} */

.services-overview .services-overview-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 3rem;
}

.service-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a202c;
}

.service-card p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    padding: 0.25rem 0;
    color: #ccc;
    font-size: 0.9rem;
}

.service-features li:before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    margin-right: 0.5rem;
}

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

.why-choose-us-section .choose-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* 
.why-choose-us-section .choose-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;
} */

.why-choose-us-section .choose-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 3rem;
}

.choose-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.choose-item:hover {
    transform: translateY(-5px);
}

.item-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.choose-item .item-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a202c;
}

.choose-item .item-description {
    color: #ccc;
    line-height: 1.6;
}

/* Testimonials Section */
#testimonials {
    padding: 80px 0;
    background: #ffffff;
}

#testimonials .testimonials-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.testimonial-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #0d6efd;
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1a202c;
}

.testimonial-company {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0;
}

/* FAQs Section */
#faqs {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

#faqs .faqs-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #212529, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}
/* 
#faqs .faqs-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;
} */

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

.faq-item {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
}

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

.faq-question {
    display: flex;
    align-items: center;
    padding: 28px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border-radius: 8px;
    margin-bottom: 8px;
}

.faq-question:hover {
    background: rgba(99, 102, 241, 0.02);
}

.faq-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #6366f1;
    min-width: 40px;
    margin-right: 20px;
}

.faq-text {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: #1a1a1a;
    line-height: 1.4;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: #6366f1;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 20px;
    text-align: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0 60px 0 60px;
}

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

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

.faq-item.active .faq-icon {
    color: #6366f1;
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    background: rgba(99, 102, 241, 0.05);
}

.live-preview-section h3 {
    color: #1a202c;
    margin-bottom: 25px;
    font-size: 1.6rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    text-align: center;
}

.live-preview {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    min-height: 600px;
    overflow-y: auto;
}

/* Preview Invoice Styles */
.preview-invoice {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow: hidden; /* Prevent content from overflowing */
}

.preview-invoice h1, .preview-invoice h2, .preview-invoice h3, .preview-invoice h4 {
    margin-bottom: 15px;
    color: #1a202c;
}

.preview-invoice table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: fixed; /* Fixed table layout for better column control */
    word-wrap: break-word; /* Break long words */
}

.preview-invoice th, .preview-invoice td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Prevent text wrapping */
    max-width: 0; /* Allow text truncation */
}

.preview-invoice th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #1a202c;
    font-size: 0.8rem; /* Smaller font for headers */
}

.preview-invoice td {
    font-size: 0.8rem; /* Smaller font for content */
}

.preview-invoice tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Specific column widths for invoice tables */
.preview-invoice table th:nth-child(1), /* Item/Description */
.preview-invoice table td:nth-child(1) {
    width: 35%;
    max-width: 35%;
}

.preview-invoice table th:nth-child(2), /* Qty */
.preview-invoice table td:nth-child(2) {
    width: 15%;
    max-width: 15%;
    text-align: center;
}

.preview-invoice table th:nth-child(3), /* Unit Price */
.preview-invoice table td:nth-child(3) {
    width: 20%;
    max-width: 20%;
    text-align: right;
}

.preview-invoice table th:nth-child(4), /* Total */
.preview-invoice table td:nth-child(4) {
    width: 20%;
    max-width: 20%;
    text-align: right;
}

.preview-invoice table th:nth-child(5), /* Additional columns if any */
.preview-invoice table td:nth-child(5) {
    width: 10%;
    max-width: 10%;
    text-align: center;
}

/* Summary rows styling */
.preview-invoice .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
    font-size: 0.8rem;
}

.preview-invoice .total-row {
    border-top: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    font-weight: bold;
    font-size: 1rem;
    padding: 12px 0;
}

/* Fix for specific invoice formats */
.format-commercial .commercial-items-table,
.format-modern .modern-items,
.format-accent .accent-items-table,
.format-structured .structured-items-table,
.format-grid .grid-items-table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
    border-spacing: 0;
    border-collapse: collapse;
}

/* Ensure all invoice format tables have proper constraints */
.format-commercial .commercial-items-table th,
.format-commercial .commercial-items-table td,
.format-modern .modern-items th,
.format-modern .modern-items td,
.format-accent .accent-items-table th,
.format-accent .accent-items-table td,
.format-structured .structured-items-table th,
.format-structured .structured-items-table td,
.format-grid .grid-items-table th,
.format-grid .grid-items-table td {
    padding: 8px 6px;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0;
    border-spacing: 0;
    border-collapse: collapse;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .preview-invoice table {
        font-size: 0.7rem;
    }
    
    .preview-invoice th, .preview-invoice td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
    
    .preview-invoice .summary-row {
        font-size: 0.7rem;
    }
    
    .preview-invoice .total-row {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .preview-invoice table {
        font-size: 0.6rem;
    }
    
    .preview-invoice th, .preview-invoice td {
        padding: 4px 2px;
        font-size: 0.6rem;
    }
    
    .preview-invoice .summary-row {
        font-size: 0.6rem;
    }
    
    .preview-invoice .total-row {
        font-size: 0.8rem;
    }
}

/* Format-specific preview styles */
.preview-classic .preview-title {
    color: #667eea;
}

.preview-modern .preview-title {
    color: #ff6b6b;
}

.preview-modern .preview-header-section {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #1a202c;
    border-radius: 6px;
    padding: 15px;
    margin: -20px -20px 20px -20px;
}

.preview-modern .preview-title {
    color: #1a202c;
}

.preview-modern .preview-meta {
    color: #1a202c;
}

.preview-modern .meta-label {
    color: rgba(255, 255, 255, 0.8);
}

.preview-modern .meta-value {
    color: #1a202c;
}

.preview-elegant .preview-title {
    color: #1a202c;
}

.preview-elegant .preview-header-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #1a202c;
    border-radius: 6px;
    padding: 15px;
    margin: -20px -20px 20px -20px;
}

.preview-elegant .preview-title {
    color: #1a202c;
}

.preview-elegant .preview-meta {
    color: #1a202c;
}

.preview-elegant .meta-label {
    color: rgba(255, 255, 255, 0.8);
}

.preview-elegant .meta-value {
    color: #1a202c;
}

.preview-minimal .preview-title {
    color: #95a5a6;
}

.preview-corporate .preview-title {
    color: #27ae60;
}

.preview-corporate .preview-header-section {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #1a202c;
    border-radius: 6px;
    padding: 15px;
    margin: -20px -20px 20px -20px;
}

.preview-corporate .preview-title {
    color: #1a202c;
}

.preview-corporate .preview-meta {
    color: #1a202c;
}

.preview-corporate .meta-label {
    color: rgba(255, 255, 255, 0.8);
}

.preview-corporate .meta-value {
    color: #1a202c;
}

/* Responsive Design for Template Navigation */
@media (max-width: 1200px) {
    .layout-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .template-nav-section {
        flex: none;
        width: 100%;
        padding: 15px;
    }
    
    .template-nav-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
    }
    
    .template-nav-item {
        min-width: 200px;
        flex-shrink: 0;
        padding: 12px;
    }
    
    .editable-preview-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .tools-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .template-nav-section {
        padding: 15px;
    }
    
    .template-nav-section h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .template-nav-item {
        min-width: 180px;
        padding: 10px;
    }
    
    .template-nav-icon {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .template-nav-info h4 {
        font-size: 0.85rem;
    }
    
    .template-nav-info p {
        font-size: 0.7rem;
    }
    
    .editable-preview-section {
        padding: 15px;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: center;
    }
    
    .editable-preview {
        padding: 15px;
        min-height: 500px;
    }
    
    .preview-invoice {
        padding: 15px;
        font-size: 0.8rem;
    }
    
    .tools-section {
        padding: 20px;
    }
    
    .tools-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tool-group {
        padding: 15px;
    }
}

/* Logo Upload Styles */
.logo-upload-container {
    position: relative;
    width: 100%;
    min-height: 120px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 auto; /* Center within grid column */
}

.logo-upload-container:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Hide file input completely */
.logo-upload-input,
.template-tools-section .logo-upload-input,
input[type="file"] {
    display: none !important;
}

/* Hide all file input buttons and text */
input[type="file"]::-webkit-file-upload-button,
input[type="file"]::file-selector-button,
input[type="file"]::-moz-file-upload-button {
    display: none !important;
}

.logo-placeholder {
    text-align: center;
    color: #ccc;
    z-index: 1;
    cursor: pointer;
    padding: 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    min-height: 80px;
    max-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-placeholder:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.logo-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.logo-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.logo-preview {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 80px;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.logo-preview-img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: #1a202c;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.logo-remove-btn:hover {
    background: #c82333;
}

/* Logo Display Styles for Invoice Formats */
.preview-company-header,
.classic-company-header,
.modern-company-header,
.elegant-company-header,
.minimal-company-header,
.corporate-company-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.preview-company-logo,
.classic-company-logo,
.modern-company-logo,
.elegant-company-logo,
.minimal-company-logo,
.corporate-company-logo {
    flex-shrink: 0;
}

.preview-logo-img,
.classic-logo-img,
.modern-logo-img,
.elegant-logo-img,
.minimal-logo-img,
.corporate-logo-img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-company-details,
.classic-company-details,
.modern-company-details,
.elegant-company-details,
.minimal-company-details,
.corporate-company-info {
    flex: 1;
}

/* Form Section Styles */
.form-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto; /* Center the form section */
}

.form-section h2 {
    color: #1a202c;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    width: 100%; /* Ensure full width within container */
}

.form-group h3 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%; /* Ensure full width */
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .preview-company-header,
    .classic-company-header,
    .modern-company-header,
    .elegant-company-header,
    .minimal-company-header,
    .corporate-company-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .preview-logo-img,
    .classic-logo-img,
    .modern-logo-img,
    .elegant-logo-img,
    .minimal-logo-img,
    .corporate-logo-img {
        max-width: 50px;
        max-height: 50px;
    }
    
    .logo-upload-container {
        min-height: 100px;
    }
    
    .logo-preview-img {
        max-height: 80px;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    width: 100%; /* Ensure full width within grid */
}

.form-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1a202c;
    font-size: 0.9rem;
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field input[readonly] {
    background-color: #f8f9fa;
    color: #ccc;
}

/* Items Section Styles */
.items-container {
    margin-bottom: 15px;
}

.item-row {
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e1e5e9;
}

.btn-remove {
    background: #dc3545;
    color: #1a202c;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
}

.btn-add {
    background: #28a745;
    color: #1a202c;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn-add:hover {
    background: #218838;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e1e5e9;
    width: 100%; /* Ensure full width */
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* min-width: 150px; */
}

.btn-primary {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    color: #1a202c;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: #1a202c;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

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

/* Preview Section Styles */
.preview-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    margin: 30px auto 0; /* Center the preview section */
}

.preview-section h2 {
    color: #1a202c;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.invoice-preview {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    font-size: 0.9rem;
    line-height: 1.4;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Classic Format Styles */
.format-classic .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #667eea;
}

.format-classic .invoice-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    text-transform: uppercase;
}

.format-classic .invoice-meta {
    text-align: right;
    font-size: 0.9rem;
}

.format-classic .invoice-meta div {
    margin-bottom: 5px;
}

/* Modern Format Styles */
.format-modern .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #1a202c;
    border-radius: 10px;
}

.format-modern .invoice-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.format-modern .invoice-meta {
    text-align: right;
}

.format-modern .meta-item {
    margin-bottom: 8px;
}

.format-modern .meta-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.format-modern .meta-value {
    display: block;
    font-size: 1rem;
    font-weight: bold;
}

/* Elegant Format Styles */
.format-elegant .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #1a202c;
    border-radius: 0;
    position: relative;
}

.format-elegant .invoice-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #f1c40f, #27ae60, #3498db, #9b59b6);
}

.format-elegant .invoice-title {
    font-size: 2.8rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Georgia', serif;
}

.format-elegant .invoice-meta {
    text-align: right;
}

.format-elegant .meta-item {
    margin-bottom: 10px;
}

.format-elegant .meta-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
}

.format-elegant .meta-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Minimal Format Styles */
.format-minimal .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.format-minimal .invoice-title {
    font-size: 2rem;
    font-weight: 300;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.format-minimal .invoice-meta {
    text-align: right;
    font-size: 0.9rem;
    color: #ccc;
}

.format-minimal .invoice-meta div {
    margin-bottom: 5px;
}

/* Corporate Format Styles */
.format-corporate .invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #1a202c;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.format-corporate .invoice-title {
    font-size: 2.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.format-corporate .invoice-meta {
    text-align: right;
}

.format-corporate .meta-item {
    margin-bottom: 8px;
}

.format-corporate .meta-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.format-corporate .meta-value {
    display: block;
    font-size: 1rem;
    font-weight: bold;
}

/* Company Info Styles for Different Formats */
.company-classic .company-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 5px;
}

.company-modern .company-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 5px;
}

.company-elegant .company-name {
    font-size: 1.5rem;
    font-weight: 300;
    color: #1a202c;
    margin-bottom: 5px;
    font-family: 'Georgia', serif;
}

.company-minimal .company-name {
    font-size: 1.2rem;
    font-weight: 400;
    color: #1a202c;
    margin-bottom: 5px;
}

.company-corporate .company-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 5px;
}

/* Customer Info Styles for Different Formats */
.customer-classic .bill-to h4 {
    color: #667eea;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.customer-modern .bill-to h4 {
    color: #ff6b6b;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: bold;
}

.customer-elegant .bill-to h4 {
    color: #1a202c;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 300;
    letter-spacing: 1px;
}

.customer-minimal .bill-to h4 {
    color: #1a202c;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 400;
}

.customer-corporate .bill-to h4 {
    color: #27ae60;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Order Details Styles for Different Formats */
.order-classic .order-table td:nth-child(odd) {
    background: #ffffff;
    font-weight: bold;
    color: #667eea;
}

.order-modern .order-table td:nth-child(odd) {
    background: #3a2a2a;
    font-weight: bold;
    color: #ff6b6b;
}

.order-elegant .order-table td:nth-child(odd) {
    background: #ffffff;
    font-weight: 300;
    color: #1a202c;
}

.order-minimal .order-table td:nth-child(odd) {
    background: #ffffff;
    font-weight: 400;
    color: #1a202c;
}

.order-corporate .order-table td:nth-child(odd) {
    background: #f0fff4;
    font-weight: bold;
    color: #27ae60;
}

/* Items Table Styles for Different Formats */
.items-classic .items-table th {
    background: #667eea;
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
}

.items-modern .items-table th {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
}

.items-elegant .items-table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: 300;
}

.items-minimal .items-table th {
    background: #f8f9fa;
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: 400;
}

.items-corporate .items-table th {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
}

/* Summary Styles for Different Formats */
.summary-classic .total-row {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
    border-top: 2px solid #e1e5e9;
    padding-top: 10px;
    margin-top: 10px;
}

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

.summary-elegant .total-row {
    font-size: 1.1rem;
    font-weight: 300;
    color: #1a202c;
    border-top: 2px solid #e1e5e9;
    padding-top: 10px;
    margin-top: 10px;
}

.summary-minimal .total-row {
    font-size: 1.1rem;
    font-weight: 400;
    color: #1a202c;
    border-top: 2px solid #e1e5e9;
    padding-top: 10px;
    margin-top: 10px;
}

.summary-corporate .total-row {
    font-size: 1.1rem;
    font-weight: bold;
    color: #27ae60;
    border-top: 2px solid #e1e5e9;
    padding-top: 10px;
    margin-top: 10px;
}

/* Footer Styles for Different Formats */
.footer-classic .thank-you {
    color: #667eea !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
}

.footer-modern .thank-you {
    color: #ff6b6b !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
}

.footer-elegant .thank-you {
    color: #2c3e50 !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
}

.footer-minimal .thank-you {
    color: #333 !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
}

.footer-corporate .thank-you {
    color: #27ae60 !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
}

/* Company Info */
.company-info {
    margin-bottom: 25px;
}

.company-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 5px;
}

/* Customer Info */
.customer-info {
    margin-bottom: 25px;
}

.bill-to h4 {
    color: #667eea;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Order Details Table */
.order-details {
    margin-bottom: 25px;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.order-table td {
    padding: 8px;
    border: 1px solid #e1e5e9;
}

.order-table td:nth-child(odd) {
    background: #ffffff;
    font-weight: bold;
    color: #667eea;
}

/* Items Table */
.items-table {
    margin-bottom: 25px;
}

.items-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.items-table th {
    background: #667eea;
    color: #1a202c;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
}

.items-table td {
    padding: 10px 8px;
    border: 1px solid #e1e5e9;
}

.items-table tr:nth-child(even) {
    background: #ffffff;
}

/* Invoice Summary */
.invoice-summary {
    margin-bottom: 25px;
    border-top: 2px solid #667eea;
    padding-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

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

.total-row {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
    border-top: 2px solid #e1e5e9;
    padding-top: 10px;
    margin-top: 10px;
}

/* Invoice Footer */
.invoice-footer {
    border-top: 1px solid #e1e5e9;
    padding-top: 20px;
}

.comments {
    margin-bottom: 20px;
}

.comments h4 {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.payment-info {
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
}

.payment-info p {
    margin-bottom: 8px;
}

.thank-you {
    color: #667eea !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .layout-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .format-selection-section {
        flex: none;
        width: 100%;
        padding: 15px;
    }
    
    .format-selection-section h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .format-cards-container {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
    }
    
    .format-card {
        min-width: 200px;
        flex-shrink: 0;
        padding: 12px;
        min-height: 130px;
    }
    
    .format-preview {
        height: 60px;
        margin-bottom: 10px;
        padding: 6px 10px;
    }
    
    .preview-header {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .preview-content {
        font-size: 0.7rem;
    }
    
    .format-info h3 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .format-info p {
        font-size: 0.75rem;
    }
    
    .live-preview-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .form-section {
        padding: 20px;
        margin: 0 auto 20px;
        max-width: 95%; /* Ensure it fits on mobile */
    }
    
    .preview-section {
        padding: 20px;
        margin: 20px auto 0;
        max-width: 100%; /* Full width on mobile */
    }
    
    .live-preview-section h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .live-preview {
        padding: 15px;
        min-height: 500px;
    }
    
    .preview-invoice {
        padding: 15px;
        font-size: 0.8rem;
    }
    
    .preview-invoice th, .preview-invoice td {
        padding: 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .format-selection-section {
        padding: 15px;
    }
    
    .format-selection-section h2 {
        font-size: 1.2rem;
    }
    
    .format-card {
        min-width: 180px;
        padding: 10px;
        min-height: 120px;
    }
    
    .format-preview {
        height: 55px;
        padding: 5px 8px;
    }
    
    .preview-header {
        font-size: 0.85rem;
    }
    
    .preview-content {
        font-size: 0.65rem;
    }
    
    .format-info h3 {
        font-size: 0.85rem;
    }
    
    .format-info p {
        font-size: 0.7rem;
    }
    
    .live-preview-section {
        padding: 15px;
    }
    
    .live-preview-section h3 {
        font-size: 1.2rem;
    }
    
    .live-preview {
        padding: 10px;
        min-height: 400px;
    }
    
    .preview-invoice {
        padding: 10px;
        font-size: 0.7rem;
    }
    
    .preview-invoice th, .preview-invoice td {
        padding: 6px;
        font-size: 0.7rem;
    }
    
    .form-section {
        padding: 15px;
        margin: 0 auto 15px;
        max-width: 98%; /* Almost full width on very small screens */
    }
    
    .preview-section {
        padding: 15px;
        margin: 15px auto 0;
        max-width: 98%; /* Almost full width on very small screens */
    }
    
    .form-row {
        grid-template-columns: 1fr; /* Stack fields vertically on very small screens */
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .form-section,
    .app-header,
    .form-actions,
    .format-selection-section {
        display: none;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        position: static;
        box-shadow: none;
        border: none;
    }
    
    .invoice-preview {
        border: none;
        padding: 0;
    }
}

/* PDF Generation Styles - Optimized for single page */
.pdf-optimized {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    padding: 5px !important;
    margin: 0 !important;
}

.pdf-optimized * {
    font-size: inherit !important;
    line-height: inherit !important;
}

.pdf-optimized h1, .pdf-optimized h2, .pdf-optimized h3, .pdf-optimized h4, .pdf-optimized h5, .pdf-optimized h6 {
    font-size: 0.8rem !important;
    margin: 2px 0 !important;
    padding: 1px 0 !important;
}

.pdf-optimized table {
    font-size: 0.6rem !important;
    border-collapse: collapse !important;
    margin: 2px 0 !important;
}

.pdf-optimized th, .pdf-optimized td {
    padding: 1px 2px !important;
    font-size: 0.6rem !important;
    line-height: 1.1 !important;
    border: 1px solid #ccc !important;
}

.pdf-optimized .summary-row, .pdf-optimized .total-row {
    padding: 1px 0 !important;
    margin: 1px 0 !important;
    font-size: 0.7rem !important;
}

.pdf-optimized .form-group, .pdf-optimized .form-row {
    margin: 2px 0 !important;
    padding: 2px !important;
}

.pdf-optimized .item-row {
    padding: 2px !important;
    margin: 1px 0 !important;
}

.pdf-optimized .commercial-header,
.pdf-optimized .modern-teal-header,
.pdf-optimized .accent-header,
.pdf-optimized .structured-header,
.pdf-optimized .grid-header {
    padding: 5px !important;
    margin: 2px 0 !important;
}

.pdf-optimized .commercial-meta-section,
.pdf-optimized .modern-body-section,
.pdf-optimized .accent-customer-section,
.pdf-optimized .structured-company-section,
.pdf-optimized .grid-top-section {
    margin: 2px 0 !important;
    padding: 2px !important;
}

.pdf-optimized .commercial-items-section,
.pdf-optimized .modern-items-table,
.pdf-optimized .accent-items-section,
.pdf-optimized .structured-items-section,
.pdf-optimized .grid-items-section {
    margin: 2px 0 !important;
}

.pdf-optimized .commercial-summary-section,
.pdf-optimized .modern-footer-section,
.pdf-optimized .accent-footer-section,
.pdf-optimized .structured-summary-section,
.pdf-optimized .grid-footer-section {
    margin: 2px 0 !important;
    padding: 2px !important;
}

.pdf-optimized .grid-bottom-footer {
    padding: 5px 0 !important;
    border-top: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
}

/* Modern Format Body Section Layout */
.modern-body-section {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    align-items: flex-start;
}

.modern-customer-billing {
    flex: 1;
}

.modern-invoice-details {
    flex: 1;
}

.modern-customer-section h4,
.modern-detail-section h4 {
    color: #20b2aa;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.modern-customer-line,
.modern-detail-line {
    height: 1px;
    background: #e1e5e9;
    margin-top: 10px;
}

.modern-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
    gap: 10px;
}

.detail-label {
    font-weight: 500;
    color: #1a202c;
    min-width: 120px;
    flex-shrink: 0;
}

.detail-input {
    flex: 1;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.9rem;
    background: #fafafa;
    text-align: right;
    min-width: 150px;
}

.detail-input:focus {
    outline: none;
    border-color: #20b2aa;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(32, 178, 170, 0.1);
}

.detail-value {
    font-weight: 600;
    color: #20b2aa;
    text-align: right;
    flex: 1;
}

/* Responsive design for Modern Format */
@media (max-width: 768px) {
    .modern-body-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .modern-customer-billing,
    .modern-invoice-details {
        flex: none;
    }
}

/* Structured Summary Section Layout */
.structured-summary-section {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    align-items: flex-start;
}

.structured-summary-left {
    flex: 1;
    max-width: 450px;
    min-width: 300px;
}

.structured-summary-right {
    width: 320px;
    border: 1px solid #e1e5e9;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Align rows and right-align numeric values in Structured summary */
.structured-summary-item,
.structured-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.structured-summary-item span:last-child,
.structured-summary-total span:last-child {
    text-align: right;
    min-width: 120px;
}

.structured-summary-total span:first-child {
    font-weight: 700;
}

/* Structured Format Notes Section */
.structured-notes-section {
    border: 1px solid #e1e5e9;
    padding: 20px;
    background: #ffffff;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.structured-notes-section h4 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.structured-notes-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #fafafa;
    text-align: left;
    transition: all 0.3s ease;
}

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

.structured-notes-textarea::placeholder {
    color: #ccc;
    font-style: italic;
}

.structured-notes-content {
    min-height: 120px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    text-align: left;
}

/* Accent Format Detail Items - Horizontal Layout */
.accent-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.accent-detail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 150px;
}

.accent-detail-label {
    font-weight: 500;
    color: #1a202c;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.accent-detail-value {
    font-weight: 600;
    color: #f39c12;
    font-size: 1rem;
}

/* Grid Format Summary Section - Right Align Total */
.grid-summary-item,
.grid-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.grid-summary-item span:last-child,
.grid-summary-total span:last-child {
    text-align: right;
    min-width: 120px;
}

.grid-summary-total span:first-child {
    font-weight: 700;
}

/* Commercial Summary Section Layout */
.commercial-summary-section {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    align-items: flex-start;
}

.commercial-summary-left {
    flex: 1;
    max-width: 450px;
    min-width: 300px;
}

.commercial-summary-right {
    width: 320px;
    border: 1px solid #e1e5e9;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Loading and Success States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Animation for form sections */
.form-group {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Hover effects for interactive elements */
.form-field input:hover,
.form-field textarea:hover {
    border-color: #667eea;
}

.item-row:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Accent Format - EXPORTER and CONSIGNEE Sections */
.accent-exporter-consignee-section {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.accent-exporter-section,
.accent-consignee-section {
    flex: 1;
    background: transparent;
    border: none;
    padding: 25px;
    position: relative;
    min-height: 320px;
}

.accent-exporter-section::before,
.accent-consignee-section::before {
    display: none;
}

.accent-section-header {
    margin-bottom: 25px;
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
}

.accent-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f39c12;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-align: left;
    position: relative;
}

.accent-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: #f39c12;
    border-radius: 2px;
}

.accent-section-line {
    display: none;
}

.accent-exporter-fields,
.accent-consignee-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.accent-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.accent-field-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.accent-field-input {
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.3s ease;
    color: #495057;
    font-weight: 500;
}

.accent-field-input:focus {
    outline: none;
    border-color: #f39c12;
    background: #ffffff;
    box-shadow: none;
}

.accent-field-input::placeholder {
    color: #adb5bd;
    font-style: normal;
    font-weight: 400;
}

.accent-field-value {
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #495057;
    font-weight: 500;
    min-height: 20px;
}

/* Responsive design for EXPORTER and CONSIGNEE sections */
@media (max-width: 768px) {
    .accent-exporter-consignee-section {
        flex-direction: column;
        gap: 20px;
        margin: 20px 0;
    }
    
    .accent-exporter-section,
    .accent-consignee-section {
        padding: 20px;
        min-height: 280px;
    }
    
    .accent-section-title {
        font-size: 1.2rem;
        letter-spacing: 1.5px;
    }
    
    .accent-field-input {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .accent-exporter-fields,
    .accent-consignee-fields {
        gap: 16px;
    }
}

