/* A4 Base Styles - Used everywhere: previews, templates, PDFs */

/* Core container styles */
.a4-preview-body {
    background: #f0f2f5;
    padding: 24px;
    font-size: 14px;
    line-height: 1.4;
    color: #111827;
    font-family: "Times New Roman", Times, serif;
}

/* Document Preview Modal Styles */
.preview-hide-seal .company-seal-overlay { display: none !important; }

.a4-preview-pages { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    background: #f0f2f5; 
    padding: 20px; 
    border-radius: 8px; 
}

.a4-page { 
    background: white; 
    width: 210mm; 
    height: 297mm; 
    margin: 0 auto; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
    border-radius: 4px; 
    position: relative; 
}

.a4-page-content { 
    font-family: 'Times New Roman', Times, serif; 
    font-size: 14pt; 
    line-height: 1.5; 
    color: #000; 
    height: 100%; 
    box-sizing: border-box; 
    padding: 20mm 15mm; 
}

.margins-small .a4-page-content { padding: 10mm; }
.margins-medium .a4-page-content { padding: 15mm; }
.margins-large .a4-page-content { padding: 25mm 20mm; }
.margins-xlarge .a4-page-content { padding: 30mm 25mm; }

.a4-block { 
    display: block; 
    width: 100%; 
    margin: 0; 
    padding: 0; 
}

.a4-col { 
    display: inline-block; 
    vertical-align: top; 
    box-sizing: border-box; 
    word-break: break-word; 
    overflow-wrap: break-word; 
}

[x-cloak] { display: none !important; }

/* Direct block styles in preview-body (without a4-page wrapper) */
#proposalEditPreviewModalPreview {
    background: white;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    max-width: 794px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: "DejaVu Serif", "Times New Roman", Times, serif;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
}

#proposalEditPreviewModalPreview .a4-block {
    display: grid;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    column-gap: 0;
    row-gap: 16px;
}

#proposalEditPreviewModalPreview .a4-col {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

#proposalEditPreviewModalPreview p {
    margin: 0 0 12px 0;
}

#proposalEditPreviewModalPreview table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 12px 0;
}

#proposalEditPreviewModalPreview td,
#proposalEditPreviewModalPreview th {
    border: 1px solid #000;
    padding: 6px 4px;
    vertical-align: top;
    color: #000;
    background: #fff;
    font-weight: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

#proposalEditPreviewModalPreview th {
    background: #fff;
    font-weight: 600;
}

#proposalEditPreviewModalPreview .ql-align-center {
    text-align: center;
}

#proposalEditPreviewModalPreview .ql-align-right {
    text-align: right;
}

#proposalEditPreviewModalPreview .ql-align-left {
    text-align: left;
}

#proposalEditPreviewModalPreview .ql-align-justify {
    text-align: justify;
}

#proposalEditPreviewModalPreview img {
    max-width: 100%;
    height: auto;
}

#proposalEditPreviewModalPreview .company-seal {
    max-height: 120px;
    max-width: 120px;
    height: auto;
    width: auto;
    display: inline-block;
    z-index: 10;
    margin: 0;
    vertical-align: middle;
}

#proposalEditPreviewModalPreview .company-seal-overlay {
    position: relative;
    display: inline-block;
    width: 0;
    margin: 0 -0.5em;
    white-space: nowrap;
    font-size: 0;
    line-height: 0;
    contain: layout;
}

#proposalEditPreviewModalPreview .company-seal-overlay .company-seal {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-20%, -70%);
    pointer-events: none;
}

.a4-preview-pages {
    display: grid;
    gap: 24px;
    justify-content: center;
}

.a4-page {
    width: var(--a4-width, 794px);
    height: var(--a4-height, 1123px);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    flex: 0 0 auto;
    position: relative;
}

.a4-page-content {
    padding: var(--a4-pad-y, 56px) var(--a4-pad-x, 64px);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: grid;
    gap: 16px;
    align-content: start;
}

/* Tables in a4-page-content should match PDF */
.a4-page-content table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 10px 0;
    font-size: inherit;
}

.a4-page-content th,
.a4-page-content td {
    border: 1px solid #000;
    padding: 6px 4px;
    text-align: left;
    background: white;
    vertical-align: top;
    word-break: break-word;
    font-size: inherit;
}

.a4-page-content th {
    background: #fff;
    font-weight: bold;
}

/* Items table */
.a4-page-content .items-table-preview table {
    font-size: inherit;
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.a4-page-content .items-table-preview th,
.a4-page-content .items-table-preview td {
    border: 1px solid #000;
    padding: 6px 4px;
    background: #fff;
}

.a4-page-content .items-table-preview th {
    font-weight: 600;
    background: #fff;
}

/* Column widths for items table in preview */
.a4-page-content .items-table-preview th:nth-child(1),
.a4-page-content .items-table-preview td:nth-child(1) { width: 3%; min-width: 20px; }
.a4-page-content .items-table-preview th:nth-child(2),
.a4-page-content .items-table-preview td:nth-child(2) { width: 30%; text-align: left; }
.a4-page-content .items-table-preview th:nth-child(3),
.a4-page-content .items-table-preview td:nth-child(3) { width: 8%; min-width: 50px; }
.a4-page-content .items-table-preview th:nth-child(4),
.a4-page-content .items-table-preview td:nth-child(4) { width: 7%; min-width: 45px; }
.a4-page-content .items-table-preview th:nth-child(5),
.a4-page-content .items-table-preview td:nth-child(5) { width: 10%; min-width: 60px; }
.a4-page-content .items-table-preview th:nth-child(6),
.a4-page-content .items-table-preview td:nth-child(6) { width: 13%; min-width: 70px; }
.a4-page-content .items-table-preview th:nth-child(7),
.a4-page-content .items-table-preview td:nth-child(7) { width: 8%; min-width: 55px; }
.a4-page-content .items-table-preview th:nth-child(8),
.a4-page-content .items-table-preview td:nth-child(8) { width: 10%; min-width: 60px; }
.a4-page-content .items-table-preview th:nth-child(9),
.a4-page-content .items-table-preview td:nth-child(9) { width: 11%; min-width: 70px; }

/* Images in a4-page-content */
.a4-page-content img {
    max-width: 100%;
    height: auto;
}

.a4-page-content .company-logo {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    width: auto;
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* Alignment in a4-page-content */
.a4-page-content .ql-align-center {
    text-align: center;
}

.a4-page-content .ql-align-right {
    text-align: right;
}

.a4-page-content .ql-align-left {
    text-align: left;
}

.a4-page-content .ql-align-justify {
    text-align: justify;
}

/* Lists in a4-page-content */
.a4-page-content ol {
    padding-left: 40px;
    margin: 8px 0;
}

.a4-page-content ul {
    padding-left: 40px;
    margin: 8px 0;
}

/* Text formatting in a4-page-content */
.a4-page-content strong,
.a4-page-content .ql-bold {
    font-weight: bold;
}

.a4-page-content em,
.a4-page-content .ql-italic {
    font-style: italic;
}

.a4-page-content u,
.a4-page-content .ql-underline {
    text-decoration: underline;
}

.a4-page-content s,
.a4-page-content .ql-strike {
    text-decoration: line-through;
}

/* Headings in a4-page-content */
.a4-page-content h1 {
    font-size: 2em;
    margin: 0.67em 0;
    font-weight: bold;
}

.a4-page-content h2 {
    font-size: 1.5em;
    margin: 0.75em 0;
    font-weight: bold;
}

.a4-page-content h3 {
    font-size: 1.17em;
    margin: 0.83em 0;
    font-weight: bold;
}

/* Block elements in a4-page-content */
.a4-page-content blockquote {
    border-left: 4px solid #ccc;
    margin: 0;
    padding-left: 16px;
}

.a4-page-content code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

.a4-page-content pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
}

.a4-page-content a {
    color: #0066cc;
    text-decoration: underline;
}

/* Separators in a4-page-content */
.a4-page-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* Subscript/Superscript in a4-page-content */
.a4-page-content sub {
    vertical-align: sub;
    font-size: 0.8em;
}

.a4-page-content sup {
    vertical-align: super;
    font-size: 0.8em;
}

/* Paragraph styles in a4-page-content */
.a4-page-content p {
    margin: 0 0 10px 0;
    white-space: pre-wrap;
}

.a4-page-content p, 
.a4-page-content div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Block layout in page content */
.a4-page-content .a4-block {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.a4-page-content .a4-col {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    box-sizing: border-box;
    /* If width is set, use inline-block, otherwise flex */
}

.a4-block {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.a4-col {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex-grow: 1;
    flex-shrink: 1;
    box-sizing: border-box;
}

/* Media elements */
.a4-preview-body img {
    max-width: 100%;
    height: auto;
}

.company-logo {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    width: auto;
    display: inline-block;
    margin: 0;
    padding: 0;
}

.a4-preview-body table {
    width: 100%;
}

.a4-preview-body table td,
.a4-preview-body table th {
    word-break: break-word;
}

.a4-preview-body div,
.a4-preview-body span,
.a4-preview-body p {
    max-width: 100%;
}

/* Block layout system */
.a4-preview-body .a4-block {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.a4-preview-body .a4-col {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex-grow: 1;
    flex-shrink: 1;
    box-sizing: border-box;
}

/* Text alignment */
.a4-preview-body .ql-align-center {
    text-align: center;
}

.a4-preview-body .ql-align-right {
    text-align: right;
}

.a4-preview-body .ql-align-left {
    text-align: left;
}

.a4-preview-body .ql-align-justify {
    text-align: justify;
}

/* Lists */
.a4-preview-body ol {
    padding-left: 40px;
}

.a4-preview-body ul {
    padding-left: 40px;
}

/* Text formatting */
.a4-preview-body strong,
.a4-preview-body .ql-bold {
    font-weight: bold;
}

.a4-preview-body em,
.a4-preview-body .ql-italic {
    font-style: italic;
}

.a4-preview-body u,
.a4-preview-body .ql-underline {
    text-decoration: underline;
}

.a4-preview-body s,
.a4-preview-body .ql-strike {
    text-decoration: line-through;
}

/* Headings */
.a4-preview-body h1 {
    font-size: 2em;
    margin: 0.67em 0;
    font-weight: bold;
}

.a4-preview-body h2 {
    font-size: 1.5em;
    margin: 0.75em 0;
    font-weight: bold;
}

.a4-preview-body h3 {
    font-size: 1.17em;
    margin: 0.83em 0;
    font-weight: bold;
}

/* Block elements */
.a4-preview-body blockquote {
    border-left: 4px solid #ccc;
    margin: 0;
    padding-left: 16px;
}

.a4-preview-body code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

.a4-preview-body pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
}

.a4-preview-body a {
    color: #0066cc;
    text-decoration: underline;
}

/* Tables */
.a4-preview-body table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 10px 0;
    font-size: inherit;
}

.a4-preview-body table,
.a4-preview-body th,
.a4-preview-body td {
    border: 1px solid #000;
}

.a4-preview-body th,
.a4-preview-body td {
    padding: 6px 4px;
    text-align: left;
    background: white;
    font-size: inherit;
    word-break: break-word;
    overflow-wrap: break-word;
}

.a4-preview-body th {
    background: #fff;
    font-weight: bold;
}

/* Items table in preview */
.a4-preview-body .items-table-preview table {
    font-size: inherit;
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.a4-preview-body .items-table-preview th,
.a4-preview-body .items-table-preview td {
    border: 1px solid #000;
    padding: 6px 4px;
    background: #fff;
}

.a4-preview-body .items-table-preview th {
    font-weight: 600;
    background: #fff;
}

/* Column widths for items table in preview-body */
.a4-preview-body .items-table-preview th:nth-child(1),
.a4-preview-body .items-table-preview td:nth-child(1) { width: 3%; min-width: 20px; }
.a4-preview-body .items-table-preview th:nth-child(2),
.a4-preview-body .items-table-preview td:nth-child(2) { width: 30%; text-align: left; }
.a4-preview-body .items-table-preview th:nth-child(3),
.a4-preview-body .items-table-preview td:nth-child(3) { width: 8%; min-width: 50px; }
.a4-preview-body .items-table-preview th:nth-child(4),
.a4-preview-body .items-table-preview td:nth-child(4) { width: 7%; min-width: 45px; }
.a4-preview-body .items-table-preview th:nth-child(5),
.a4-preview-body .items-table-preview td:nth-child(5) { width: 10%; min-width: 60px; }
.a4-preview-body .items-table-preview th:nth-child(6),
.a4-preview-body .items-table-preview td:nth-child(6) { width: 13%; min-width: 70px; }
.a4-preview-body .items-table-preview th:nth-child(7),
.a4-preview-body .items-table-preview td:nth-child(7) { width: 8%; min-width: 55px; }
.a4-preview-body .items-table-preview th:nth-child(8),
.a4-preview-body .items-table-preview td:nth-child(8) { width: 10%; min-width: 60px; }
.a4-preview-body .items-table-preview th:nth-child(9),
.a4-preview-body .items-table-preview td:nth-child(9) { width: 11%; min-width: 70px; }

/* Separators */
.a4-preview-body hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* Subscript/Superscript */
.a4-preview-body sub {
    vertical-align: sub;
    font-size: 0.8em;
}

.a4-preview-body sup {
    vertical-align: super;
    font-size: 0.8em;
}

/* Font sizes */
.a4-preview-body span[data-size="10"] {
    font-size: 10px;
}

.a4-preview-body span[data-size="12"] {
    font-size: 12px;
}

.a4-preview-body span[data-size="14"] {
    font-size: 14px;
}

.a4-preview-body span[data-size="16"] {
    font-size: 16px;
}

.a4-preview-body span[data-size="18"] {
    font-size: 18px;
}

.a4-preview-body span[data-size="20"] {
    font-size: 20px;
}

.a4-preview-body span[data-size="24"] {
    font-size: 24px;
}

.a4-preview-body span[data-size="28"] {
    font-size: 28px;
}

.a4-preview-body span[data-size="32"] {
    font-size: 32px;
}

/* Signature lines - positioned at bottom of page */
.a4-page {
    position: relative;
}

.a4-page .signature-lines {
    position: absolute;
    bottom: var(--a4-pad-y, 56px);
    left: var(--a4-pad-x, 64px);
    width: calc(100% - var(--a4-pad-x, 64px) * 2);
    display: flex;
    gap: 40px;
    box-sizing: border-box;
}

.a4-page .signature-line {
    flex: 1;
    border-bottom: 1px solid #000;
    height: 24px;
}

/* Signature lines fallback for preview-body */
.a4-preview-body .signature-lines {
    box-sizing: border-box;
    gap: 40px;
    width: calc(100% - var(--a4-pad-x, 64px) * 2);
    margin-top: 40px;
    display: flex;
}

.a4-preview-body .signature-line {
    flex: 1;
    border-bottom: 1px solid #000;
    height: 24px;
}

/* Page margin sizes */
.a4-preview-pages.margins-small .a4-page-content {
    --a4-pad-y: 38px;
    --a4-pad-x: 38px;
}

.a4-preview-pages.margins-medium .a4-page-content {
    --a4-pad-y: 57px;
    --a4-pad-x: 57px;
}

.a4-preview-pages.margins-large .a4-page-content {
    --a4-pad-y: 94px;
    --a4-pad-x: 76px;
}

.a4-preview-pages.margins-xlarge .a4-page-content {
    --a4-pad-y: 113px;
    --a4-pad-x: 94px;
}

/* Font families from Quill */
.a4-page-content .ql-font-arial {
    font-family: "DejaVu Sans", Arial, sans-serif;
}

.a4-page-content .ql-font-times-new-roman {
    font-family: "DejaVu Serif", "Times New Roman", Times, serif;
}

.a4-page-content .ql-font-georgia {
    font-family: "DejaVu Serif", Georgia, serif;
}

.a4-page-content .ql-font-roboto {
    font-family: "DejaVu Sans", Roboto, Arial, sans-serif;
}

.a4-page-content .ql-font-pt-sans {
    font-family: "DejaVu Sans", "PT Sans", Arial, sans-serif;
}

/* Alignment on page-content level (for document view) */
.a4-page-content .ql-align-right {
    text-align: right;
}

.a4-page-content .ql-align-center {
    text-align: center;
}

.a4-page-content .ql-align-justify {
    text-align: justify;
}

.a4-page-content .ql-align-left {
    text-align: left;
}

/* Inline style alignments */
.a4-page-content [style*="text-align: right"],
.a4-page-content [style*="text-align:right"] {
    text-align: right;
}

.a4-page-content [style*="text-align: center"],
.a4-page-content [style*="text-align:center"] {
    text-align: center;
}

.a4-page-content [style*="text-align: justify"],
.a4-page-content [style*="text-align:justify"] {
    text-align: justify;
}

/* Print styles */
@media print {
    .a4-preview-body {
        background: white;
        padding: 0;
        border: none;
        border-radius: 0;
    }
    .a4-page {
        box-shadow: none;
        border: none;
        width: 100%;
        height: auto;
        zoom: 1;
        page-break-after: always;
    }
    .a4-page-content {
        overflow: visible;
        display: block;
    }
}

/* Commercial proposal modal preview specific */
#proposalEditPreviewModalPreview {
    font-family: "DejaVu Serif", "Times New Roman", Times, serif;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
    background: #f0f2f5;
    padding: 20px;
    border-radius: 12px;
    overflow-y: auto;
    --a4-preview-scale: 0.7;
}

#proposalEditPreviewModalPreview .a4-preview-pages {
    background: white;
    padding: 0;
    display: flex;
    justify-content: center;
}

#proposalEditPreviewModalPreview .a4-page {
    width: 794px;
    height: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    zoom: var(--a4-preview-scale);
    flex-shrink: 0;
    overflow: visible;
}

#proposalEditPreviewModalPreview .a4-page-content {
    padding: 40px;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
    box-sizing: border-box;
    width: 100%;
}

#proposalEditPreviewModalPreview .a4-block {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
    gap: 0;
    margin: 0;
    padding: 0;
}

#proposalEditPreviewModalPreview .a4-col {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex-grow: 1;
    flex-shrink: 1;
    box-sizing: border-box;
}

#proposalEditPreviewModalPreview table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 12px 0;
}

#proposalEditPreviewModalPreview th,
#proposalEditPreviewModalPreview td {
    border: 1px solid #e5e7eb;
    padding: 6px 4px;
    vertical-align: top;
    font-size: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
}

#proposalEditPreviewModalPreview th {
    background: #f9fafb;
    font-weight: 600;
}

#proposalEditPreviewModalPreview p {
    margin: 0 0 8px;
}

@media print {
    #proposalEditPreviewModalPreview {
        background: white;
        padding: 0;
        border: none;
        border-radius: 0;
    }
    #proposalEditPreviewModalPreview .a4-page {
        box-shadow: none;
        border: none;
        width: 100%;
        zoom: 1;
        page-break-after: always;
    }
}

/* Fallback для oklch цветов при печати (html2canvas не поддерживает oklch) */
@media print, screen {
    .a4-page, .a4-page *, .a4-page-content, .a4-page-content * {
        /* Tailwind gray colors - заменяем oklch на rgb */
        --color-gray-50: #f9fafb;
        --color-gray-100: #f3f4f6;
        --color-gray-200: #e5e7eb;
        --color-gray-300: #d1d5db;
        --color-gray-400: #9ca3af;
        --color-gray-500: #6b7280;
        --color-gray-600: #4b5563;
        --color-gray-700: #374151;
        --color-gray-800: #1f2937;
        --color-gray-900: #111827;
        --color-gray-950: #030712;
        
        /* Tailwind slate colors */
        --color-slate-50: #f8fafc;
        --color-slate-100: #f1f5f9;
        --color-slate-200: #e2e8f0;
        --color-slate-300: #cbd5e1;
        --color-slate-400: #94a3b8;
        --color-slate-500: #64748b;
        --color-slate-600: #475569;
        --color-slate-700: #334155;
        --color-slate-800: #1e293b;
        --color-slate-900: #0f172a;
        --color-slate-950: #020617;
        
        /* Tailwind zinc colors */
        --color-zinc-50: #fafafa;
        --color-zinc-100: #f4f4f5;
        --color-zinc-200: #e4e4e7;
        --color-zinc-300: #d4d4d8;
        --color-zinc-400: #a1a1aa;
        --color-zinc-500: #71717a;
        --color-zinc-600: #52525b;
        --color-zinc-700: #3f3f46;
        --color-zinc-800: #27272a;
        --color-zinc-900: #18181b;
        --color-zinc-950: #09090b;
        
        /* Tailwind neutral colors */
        --color-neutral-50: #fafafa;
        --color-neutral-100: #f5f5f5;
        --color-neutral-200: #e5e5e5;
        --color-neutral-300: #d4d4d4;
        --color-neutral-400: #a3a3a3;
        --color-neutral-500: #737373;
        --color-neutral-600: #525252;
        --color-neutral-700: #404040;
        --color-neutral-800: #262626;
        --color-neutral-900: #171717;
        --color-neutral-950: #0a0a0a;
        
        /* Tailwind red colors */
        --color-red-50: #fef2f2;
        --color-red-100: #fee2e2;
        --color-red-200: #fecaca;
        --color-red-300: #fca5a5;
        --color-red-400: #f87171;
        --color-red-500: #ef4444;
        --color-red-600: #dc2626;
        --color-red-700: #b91c1c;
        --color-red-800: #991b1b;
        --color-red-900: #7f1d1d;
        --color-red-950: #450a0a;
        
        /* Tailwind blue colors */
        --color-blue-50: #eff6ff;
        --color-blue-100: #dbeafe;
        --color-blue-200: #bfdbfe;
        --color-blue-300: #93c5fd;
        --color-blue-400: #60a5fa;
        --color-blue-500: #3b82f6;
        --color-blue-600: #2563eb;
        --color-blue-700: #1d4ed8;
        --color-blue-800: #1e40af;
        --color-blue-900: #1e3a8a;
        --color-blue-950: #172554;
        
        /* Tailwind green colors */
        --color-green-50: #f0fdf4;
        --color-green-100: #dcfce7;
        --color-green-200: #bbf7d0;
        --color-green-300: #86efac;
        --color-green-400: #4ade80;
        --color-green-500: #22c55e;
        --color-green-600: #16a34a;
        --color-green-700: #15803d;
        --color-green-800: #166534;
        --color-green-900: #14532d;
        --color-green-950: #052e16;
        
        /* Tailwind emerald colors */
        --color-emerald-50: #ecfdf5;
        --color-emerald-100: #d1fae5;
        --color-emerald-200: #a7f3d0;
        --color-emerald-300: #6ee7b7;
        --color-emerald-400: #34d399;
        --color-emerald-500: #10b981;
        --color-emerald-600: #059669;
        --color-emerald-700: #047857;
        --color-emerald-800: #065f46;
        --color-emerald-900: #064e3b;
        --color-emerald-950: #022c22;
        
        /* Tailwind purple colors */
        --color-purple-50: #faf5ff;
        --color-purple-100: #f3e8ff;
        --color-purple-200: #e9d5ff;
        --color-purple-300: #d8b4fe;
        --color-purple-400: #c084fc;
        --color-purple-500: #a855f7;
        --color-purple-600: #9333ea;
        --color-purple-700: #7e22ce;
        --color-purple-800: #6b21a8;
        --color-purple-900: #581c87;
        --color-purple-950: #3b0764;
        
        /* Tailwind indigo colors */
        --color-indigo-50: #eef2ff;
        --color-indigo-100: #e0e7ff;
        --color-indigo-200: #c7d2fe;
        --color-indigo-300: #a5b4fc;
        --color-indigo-400: #818cf8;
        --color-indigo-500: #6366f1;
        --color-indigo-600: #4f46e5;
        --color-indigo-700: #4338ca;
        --color-indigo-800: #3730a3;
        --color-indigo-900: #312e81;
        --color-indigo-950: #1e1b4b;
    }
}

/* Mobile responsive styles for document preview */
@media (max-width: 639px) {
    /* Reduce padding on mobile preview body */
    .a4-preview-body {
        padding: 8px !important;
        background: transparent !important;
        border-radius: 0 !important;
    }
    
    /* Scale A4 pages to fit mobile screen width */
    .a4-preview-pages {
        padding: 8px !important;
        gap: 8px !important;
    }
    
    .a4-page {
        width: auto !important;
        height: auto !important;
        margin: 0 auto !important;
        transform: scale(0.85) !important;
        transform-origin: top center !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .a4-page-content {
        overflow: visible !important;
        padding: 15mm !important;
    }
    
    /* Ensure tables are responsive on mobile */
    .a4-preview-body table {
        font-size: 12px !important;
    }
    
    .a4-preview-body table td,
    .a4-preview-body table th {
        padding: 4px 2px !important;
    }
    
    /* Reduce margins for small screens */
    .margins-small .a4-page-content { padding: 8mm !important; }
    .margins-medium .a4-page-content { padding: 10mm !important; }
    .margins-large .a4-page-content { padding: 12mm !important; }
    .margins-xlarge .a4-page-content { padding: 12mm !important; }
}
