:root {
    --rqc-blue: #0b4f8a;
    --rqc-blue-dark: #07345d;
    --rqc-blue-soft: #eaf3fb;
    --rqc-orange: #f28c28;
    --rqc-orange-dark: #c9660c;
    --rqc-orange-soft: #fff2e3;
    --rqc-border: #24435f;
    --rqc-text: #10202f;
}
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    background: #e8eef4;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--rqc-text);
}
.rqc-toolbar {
    max-width: 210mm;
    margin: 12px auto;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.rqc-toolbar button,
.rqc-toolbar a {
    border: 0;
    border-radius: 6px;
    color: #fff;
    padding: 10px 16px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.rqc-toolbar button {
    background: var(--rqc-orange);
}
.rqc-toolbar button:hover {
    background: var(--rqc-orange-dark);
}
.rqc-toolbar a {
    background: var(--rqc-blue);
}
.rqc-toolbar a:hover {
    background: var(--rqc-blue-dark);
}
.rqc-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 24px;
    padding: 4mm;
    background: #fff;
    display: grid;
    grid-template-columns: 48.5% 51.5%;
    border: 1px solid var(--rqc-blue-dark);
    border-top: 2px solid var(--rqc-orange);
    box-shadow: 0 4px 24px rgba(7, 52, 93, .18);
    direction: ltr;
    overflow: hidden;
}
.rqc-left-column {
    padding-right: 2mm;
    border-right: 1px solid var(--rqc-blue-dark);
}
.rqc-right-column {
    padding-left: 2mm;
}
.rqc-header {
    height: 30mm;
    display: grid;
    grid-template-columns: 28mm 1fr;
    gap: 4mm;
    align-items: start;
}
.rqc-qr {
    text-align: center;
}
.rqc-qr img {
    width: 25mm;
    height: 25mm;
    display: block;
    margin: 0 auto;
    border: .45mm solid var(--rqc-blue);
    padding: .5mm;
    background: #fff;
}
.rqc-qr small {
    display: block;
    font-size: 4.6px;
    line-height: 1.1;
    color: var(--rqc-blue-dark);
    overflow-wrap: anywhere;
}
.rqc-sheet-meta {
    padding-top: 3mm;
    font-size: 8px;
}
.rqc-sheet-meta div {
    display: grid;
    grid-template-columns: 25mm 1fr;
    border-bottom: 1px solid var(--rqc-orange);
    padding: 1.5mm 0;
}
.rqc-sheet-meta strong {
    color: var(--rqc-blue-dark);
}
.rqc-sheet-meta span {
    color: var(--rqc-orange-dark);
    font-weight: 700;
}
.rqc-unit-title {
    color: var(--rqc-blue-dark);
    font-weight: 700;
    font-size: 11px;
    margin: 0 0 1mm;
    padding-left: 1.2mm;
    border-left: 1.2mm solid var(--rqc-orange);
}
.rqc-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.rqc-table th,
.rqc-table td {
    border: 1px solid var(--rqc-border);
    padding: 1.1mm 1.4mm;
    vertical-align: middle;
    font-size: 7px;
    line-height: 1.18;
}
.rqc-table th {
    color: var(--rqc-blue-dark);
}
.rqc-section-title th {
    text-align: left;
    font-size: 9px;
    padding: 1.3mm;
    color: #fff;
    background: var(--rqc-blue);
}
.rqc-prep-table th {
    width: 43%;
    text-align: left;
    font-weight: 600;
    background: var(--rqc-blue-soft);
}
.rqc-prep-table .rqc-section-title th {
    background: var(--rqc-blue);
}
.rqc-prep-table td {
    width: 57%;
}
.rqc-persian-note {
    font-size: 6.2px;
    line-height: 1.55;
    padding: 4mm 3mm 2mm;
    margin-top: 1mm;
    text-align: justify;
    background: linear-gradient(90deg, var(--rqc-orange-soft), #fff 70%);
    border-right: .8mm solid var(--rqc-orange);
}
.rqc-persian-note strong {
    display: block;
    text-align: center;
    font-size: 7px;
    color: var(--rqc-blue-dark);
}
.rqc-footer-brand {
    text-align: center;
    color: var(--rqc-blue-dark);
    font-weight: 700;
    font-size: 7px;
    margin-top: 3mm;
}
.rqc-micro-table {
    margin-bottom: 1.5mm;
}
.rqc-micro-table th:nth-child(1) { width: 45%; }
.rqc-micro-table th:nth-child(2) { width: 28%; }
.rqc-micro-table th:nth-child(3),
.rqc-micro-table th:nth-child(4) { width: 13.5%; }
.rqc-micro-table tr:nth-child(3) th {
    background: var(--rqc-blue-soft);
}
.rqc-micro-subtitle {
    font-size: 6.5px !important;
    color: var(--rqc-orange-dark);
    font-weight: 700;
}
.rqc-micro-notes {
    font-size: 6px !important;
    line-height: 1.25 !important;
    background: var(--rqc-orange-soft);
}
.rqc-center {
    text-align: center;
    color: var(--rqc-orange-dark);
    font-size: 10px !important;
}
.rqc-products-table th,
.rqc-products-table td {
    font-size: 5.8px;
    line-height: 1.08;
    padding: .8mm 1mm;
}
.rqc-products-table tr:first-child th {
    color: #fff;
    background: var(--rqc-orange);
    border-color: var(--rqc-orange-dark);
}
.rqc-products-table th:nth-child(1),
.rqc-products-table th:nth-child(3) {
    width: 36%;
}
.rqc-products-table th:nth-child(2),
.rqc-products-table th:nth-child(4) {
    width: 14%;
}
.rqc-product-cell strong {
    color: var(--rqc-blue-dark);
    font-size: 6.2px;
}
.rqc-product-options {
    display: flex;
    flex-wrap: wrap;
    gap: .7mm 1.3mm;
    margin-top: .5mm;
}
.rqc-product-options span {
    white-space: nowrap;
}
.rqc-lot-cell {
    text-align: center;
    color: var(--rqc-orange-dark);
    font-weight: 700;
    overflow-wrap: anywhere;
}
.rqc-red-tick {
    display: inline-block;
    color: var(--rqc-orange-dark);
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    margin-right: 1.2mm;
    transform: rotate(-13deg) scaleX(1.15);
    transform-origin: center;
    text-shadow: 0.15mm 0 var(--rqc-orange-dark);
}
.rqc-prep-table td .rqc-red-tick {
    vertical-align: -0.4mm;
}
.rqc-red-tick-empty {
    width: 0;
    margin-right: 0;
    text-shadow: none;
}
@page {
    size: A4 portrait;
    margin: 0;
}
@media print {
    html, body {
        width: 210mm;
        height: 297mm;
        background: #fff;
    }
    .rqc-toolbar {
        display: none !important;
    }
    .rqc-sheet {
        margin: 0;
        border: 0;
        border-top: 2px solid var(--rqc-orange);
        box-shadow: none;
        width: 210mm;
        height: 297mm;
        min-height: 297mm;
        page-break-after: avoid;
    }
    .rqc-red-tick,
    .rqc-section-title th,
    .rqc-products-table tr:first-child th,
    .rqc-prep-table th,
    .rqc-micro-table tr:nth-child(3) th,
    .rqc-micro-notes,
    .rqc-persian-note {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
@media screen and (max-width: 900px) {
    body {
        overflow-x: auto;
    }
    .rqc-toolbar {
        width: 210mm;
        padding-right: 8px;
    }
}
