.quote-print-dialog.e-dialog {
    width: min(1100px, calc(100vw - 1.25rem)) !important;
    height: min(88vh, calc(100dvh - 1rem)) !important;
    max-height: min(88vh, calc(100dvh - 1rem)) !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.quote-print-dialog.e-dialog > .e-dlg-header-content,
.quote-print-dialog.e-dialog > .e-footer-content {
    flex: 0 0 auto !important;
}

.quote-print-dialog.e-dialog > .e-dlg-content {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
}

.quote-print-dialog .quote-print-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem 0.75rem 0.85rem;
    max-height: calc(min(88vh, 100dvh - 1rem) - 7.25rem);
    box-sizing: border-box;
    position: relative;
    background: #eef2f6;
}

.qpd-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 12rem;
    color: #64748b;
    font-weight: 650;
}

.qpd-state--error,
.qpd-banner {
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font-weight: 650;
    margin-bottom: 0.65rem;
}

.qpd-state--error {
    color: #b91c1c;
    background: #fef2f2;
}

.qpd-banner {
    color: #166534;
    background: #ecfdf3;
}

.qpd-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.74);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #222;
}

.qpd-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #c7c7c7;
    border-top-color: #2f5eff;
    border-radius: 50%;
    animation: qpd-spin 0.8s linear infinite;
}

@keyframes qpd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.qpd-sheet {
    position: relative;
    background: #fff;
    padding: 0.85rem 1rem 1.1rem;
    overflow: hidden;
    font-family: "Times New Roman", Times, serif;
    font-size: 13px;
    color: #111;
}

.qpd-watermark {
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%) rotate(-38deg);
    font-size: clamp(1.55rem, 4vw, 2.55rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(185, 28, 28, 0.22);
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
}

.qpd-sheet-inner {
    position: relative;
    z-index: 1;
}

.qpd-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
    margin-bottom: 0.35rem;
}

.qpd-top {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.qpd-company h5,
.qpd-addresses h5 {
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.qpd-company p,
.qpd-meta p {
    margin: 0;
    padding: 0;
}

.qpd-meta {
    text-align: right;
    min-width: 220px;
}

.qpd-meta p {
    margin-bottom: 0.35rem;
}

.qpd-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    border-radius: 999px;
    padding: 0.05rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    font-style: normal;
}

.qpd-divider {
    margin: 8px 0 12px;
    border-bottom: 1px solid #1c6ea4;
}

.qpd-addresses {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.qpd-addresses address {
    margin: 0.2rem 0 0;
    line-height: 1.5;
    font-style: normal;
}

.qpd-ship {
    text-align: right;
}

.qpd-table-host {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 0.85rem;
}

.qpd-table {
    font-family: "Times New Roman", Times, serif;
    border: 1px solid #1c6ea4;
    width: 100%;
    text-align: center;
    border-collapse: collapse;
}

.qpd-table td,
.qpd-table th {
    border: 1px solid #aaa;
    padding: 3px 4px;
}

.qpd-table tbody td {
    font-size: 12px;
    font-weight: 700;
}

.qpd-table thead {
    background: linear-gradient(to bottom, #4a79bb 0%, #265ead 66%, #0e4ca4 100%);
    border-bottom: 2px solid #444;
}

.qpd-table thead th {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    border-left: 2px solid #d0e4f5;
}

.qpd-table thead th:first-child {
    border-left: none;
}

.qpd-table .text-left {
    text-align: left;
}

.qpd-table .num {
    text-align: right;
}

.qpd-totals {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.qpd-money {
    text-align: right;
    min-width: 240px;
}

.qpd-money p {
    margin: 0 0 0.25rem;
}

.qpd-grand {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 0.35rem;
}

.qpd-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    padding: 0.35rem 0.15rem;
}
