.cmr-preview-shell {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #e9ecef;
    padding: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    direction: ltr;
    display: flex;
    justify-content: center;
}
@media screen {
    [data-bs-theme="dark"] .cmr-preview-shell {
        background: transparent;
    }
}
.cmr-preview-frame {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
}
.cmr-preview-scaler {
    width: 210mm;
    height: 297mm;
    transform-origin: top left;
    will-change: transform;
}
.cmr-view,
.cmr-view * {
    box-sizing: border-box;
}
.cmr-view {
    direction: ltr !important;
    width: 210mm;
    min-width: 210mm;
    max-width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    margin: 0;
    padding: 10mm;
    overflow: hidden;
    background: #fff;
    color: #000;
    font-family: Vazir, "Vazirmatn", Tahoma, Arial, sans-serif;
}
.cmr-sheet {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #000;
    background: #fff;
    overflow: hidden;
}
.cmr-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.cmr-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
}
.cmr-col-6 {
    width: 50%;
    flex: 0 0 50%;
}
.cmr-col-4 {
    width: 33.333%;
    flex: 0 0 33.333%;
}
.cmr-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #000;
    background: #fff;
    overflow: hidden;
}
.cmr-box-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 1mm 1.8mm 0;
    font-size: 4.4pt;
    font-weight: 700;
    line-height: 1.15;
    flex: 0 0 auto;
}
.cmr-box-head .h-en {
    text-align: left;
    flex: 1 1 auto;
}
.cmr-box-head .h-fa {
    text-align: right;
    flex: 1 1 40%;
    max-width: 48%;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: normal;
    overflow: visible;
    line-height: 1.15;
}
html[dir="rtl"] .cmr-box-head .h-fa {
    direction: rtl;
}
.cmr-box-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.8mm 1.8mm 1.2mm;
    overflow: hidden;
}
.response {
    font-size: 7pt;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    max-width: 100%;
    color: #000;
    text-transform: uppercase;
}
.cmr-row-top {
    flex: 0 0 104mm;
    height: 104mm;
    max-height: 104mm;
}
.cmr-row-top > .cmr-col-6:last-child {
    border-left: 1px solid #000;
}
.cmr-row-top .cmr-col-6:first-child .cmr-box[data-box="1"] { height: 26mm; flex: 0 0 26mm; }
.cmr-row-top .cmr-col-6:first-child .cmr-box[data-box="2"] { height: 26mm; flex: 0 0 26mm; }
.cmr-row-top .cmr-col-6:first-child .cmr-box[data-box="3"] { height: 15mm; flex: 0 0 15mm; }
.cmr-row-top .cmr-col-6:first-child .cmr-box[data-box="4"] { height: 15mm; flex: 0 0 15mm; }
.cmr-row-top .cmr-col-6:first-child .cmr-box[data-box="5"] {
    flex: 1 1 auto;
    border-bottom: 0;
}
.cmr-header-box {
    height: 28mm;
    flex: 0 0 28mm;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-bottom: 1px solid #000;
}
.cmr-header-left,
.cmr-header-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6mm;
    padding: 1.2mm 1.8mm;
    text-align: center;
}
.cmr-header-left { width: 58%; }
.cmr-header-right { width: 42%; }
.cmr-title-en {
    font-size: 7pt;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.1;
}
.cmr-title-fa {
    font-size: 8pt;
    font-weight: 700;
    line-height: 1.1;
    direction: rtl;
}
.cmr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14mm;
    height: 6.5mm;
    border: 1.2px solid #000;
    border-radius: 50%;
    font-size: 9pt;
    font-weight: 700;
    line-height: 1;
}
.cmr-legal {
    font-size: 6pt;
    font-weight: 700;
    line-height: 1.15;
    text-align: justify;
}
.cmr-legal-fa {
    font-size: 5.2pt;
    font-weight: 700;
    line-height: 1.15;
    direction: ltr;
    text-align: justify;
}
html[dir="rtl"] .cmr-legal-fa {
    direction: rtl;
}
.cmr-logo-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2mm;
    width: 100%;
}
.cmr-logo-row img.logo {
    max-height: 10mm;
    max-width: 10mm;
    height: auto;
    width: auto;
    object-fit: contain;
}
.cmr-company-name {
    font-size: 6.5pt;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}
.cmr-number {
    font-size: 9pt;
    font-weight: 700;
}
.cmr-carrier-frame {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 4px solid #000;
    margin: 0;
    background: #fff;
}
.cmr-carrier-frame .cmr-box {
    border: 0;
    border-bottom: 1px solid #000;
}
.cmr-carrier-frame .cmr-box[data-box="16"],
.cmr-carrier-frame .cmr-box[data-box="17"] {
    height: 24mm;
    flex: 0 0 24mm;
}
.cmr-carrier-frame .cmr-box[data-box="18"] {
    flex: 1 1 auto;
    border-bottom: 0;
}
.cmr-row-goods {
    flex: 1 1 auto;
    min-height: 0;
}
.cmr-goods-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
    font-size: 6.5pt;
}
.cmr-goods-table th,
.cmr-goods-table td {
    border: 1px solid #000;
    vertical-align: top;
    padding: 0;
}
.cmr-goods-table thead {
    height: 0;
}
.cmr-goods-table thead th {
    height: auto;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    padding: 1mm 0.5mm;
}
.cmr-goods-table tbody {
    height: 100%;
}
.cmr-goods-table tbody tr {
    height: 100%;
}
.th-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2mm;
    line-height: 0.9;
    font-size: 6pt;
    font-weight: 700;
}
.th-content .h-en {
    white-space: nowrap;
    line-height: 0.9;
}
.th-content .h-fa {
    direction: rtl;
    unicode-bidi: isolate;
    line-height: 0.9;
}
.cmr-goods-desc {
    padding: 3.5mm 2.2mm 2mm;
}
.cmr-goods-weight {
    padding: 5mm 2mm 2mm;
    text-align: center;
}
.cmr-goods-table tfoot th,
.cmr-goods-table tfoot td {
    height: 6mm;
    font-size: 6.5pt;
    font-weight: 700;
    padding: 0.5mm 1.4mm;
    vertical-align: middle;
    text-align: left;
}
.cmr-hr {
    margin: 2.2mm 0 !important;
    border: 0;
    border-top: 1px solid #000;
}
.cmr-row-mid {
    flex: 0 0 54mm;
    height: 54mm;
    max-height: 54mm;
}
.cmr-row-mid > .cmr-col-6:last-child {
    border-left: 1px solid #000;
}
.cmr-row-mid .cmr-box[data-box="13"] { height: 26mm; flex: 0 0 26mm; }
.cmr-row-mid .cmr-box[data-box="14"] { height: 16mm; flex: 0 0 16mm; }
.cmr-row-mid .cmr-box[data-box="21"] {
    flex: 1 1 auto;
    border-bottom: 1px solid #000;
}
.cmr-row-mid .cmr-box[data-box="19"] { height: 8mm; flex: 0 0 8mm; }
.cmr-row-mid .cmr-box[data-box="15"] {
    height: 8mm;
    flex: 0 0 8mm;
    border-bottom: 1px solid #000;
}
.cmr-pay-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
}
.cmr-pay-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2mm;
}
.cmr-pay-item .form-check-input {
    width: 3.2mm !important;
    height: 3.2mm !important;
    min-width: 3.2mm;
    margin: 0;
    border: 1px solid #000;
    border-radius: 0 !important;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
}
.cmr-pay-item .form-check-input:checked {
    background: #000;
}
.cmr-pay-label {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: baseline;
    gap: 3mm;
    font-size: 6pt;
    font-weight: 600;
}
.cmr-issue {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.cmr-issue-meta {
    width: 38%;
    padding: 1mm 1.8mm;
    font-size: 6pt;
    font-weight: 600;
    line-height: 1.2;
}
.cmr-issue-value {
    width: 62%;
    padding: 1mm 1.8mm;
}
.cmr-expanse-wrap {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
}
.cmr-expanse-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
    font-size: 6pt;
    border: 3px solid #000;
}
.cmr-expanse-table th,
.cmr-expanse-table td {
    border: 1px solid #000;
    padding-block: 0.5mm !important;
    vertical-align: middle;
}
.cmr-expanse-table thead th {
    font-weight: 700;
    height: 5.5mm;
}
.cmr-expanse-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2mm;
    font-weight: 700;
    font-size: 4.4pt;
}
.cmr-expanse-head .h-fa {
    direction: rtl;
    unicode-bidi: isolate;
}
.cmr-expanse-table tbody th {
    text-align: left;
    font-weight: 700;
}
.cmr-row-sign {
    flex: 0 0 32mm;
    height: 32mm;
    max-height: 32mm;
}
.cmr-row-sign .cmr-box {
    height: 32mm;
    border-bottom: 0;
    border-top: 0;
    border-right: 1px solid #000;
}
.cmr-row-sign .cmr-box:last-child {
    border-right: 0;
}
.cmr-sign-slot {
    flex: 1 1 auto;
    min-height: 0;
    height: 20mm;
    overflow: hidden;
}
.cmr-sign-slot img {
    max-height: 20mm;
    max-width: 100%;
    object-fit: contain;
}
.cmr-view .row,
.cmr-view .d-flex {
    flex-wrap: nowrap;
}
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }
    html,
    body {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0;
        background: #fff;
    }
    .cmr-preview-shell,
    .cmr-preview-frame,
    .cmr-preview-scaler {
        transform: none !important;
        width: 210mm !important;
        height: 297mm !important;
        margin: 0;
        padding: 0;
        background: #fff;
        overflow: hidden;
    }
    .cmr-view {
        transform: none !important;
        width: 210mm !important;
        height: 297mm !important;
        max-height: 297mm !important;
        padding: 10mm;
        box-shadow: none;
        overflow: hidden !important;
    }
    .modal-header,
    .modal-footer,
    button {
        display: none !important;
    }
}