﻿.offer-wizard-page {
    background: #f7f8fb;
    min-height: 100vh;
    padding-bottom: 140px;
    overflow-x: clip;
}

.wizard-topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #eceff4;
}

.wizard-steps {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 18px 2px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.wizard-step {
    min-width: max-content;
    border: 1px solid #e6eaf1;
    background: #fff;
    color: #4b5565;
    border-radius: 999px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: start;
}

    .wizard-step:hover {
        border-color: #cfd7e6;
        background: #fafbfc;
    }

    .wizard-step .step-no {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #f1f4f9;
        color: #1f3f75;
        font-size: 13px;
        font-weight: 700;
        flex: 0 0 28px;
    }

    .wizard-step.active {
        background: #1f3f75;
        color: #fff;
        border-color: #1f3f75;
    }

    .wizard-step.completed {
        background: #314867;
        color: #fff;
        border-color: #314867;
    }

        .wizard-step.active .step-no,
        .wizard-step.completed .step-no {
            background: rgba(255, 255, 255, .16);
            color: #fff;
        }

.wizard-shell {
    padding-top: 28px;
}

.glass-panel {
    border: 1px solid #e8edf3;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(20, 30, 50, 0.04);
    min-width: 0;
}

.section-panel {
    padding: 30px;
}

.section-head {
    margin-bottom: 24px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f1f4f8;
    color: #314867;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-title {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    color: #192435;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.section-subtitle {
    color: #697386;
    font-size: 15px;
    margin-bottom: 0;
    max-width: 900px;
    line-height: 1.6;
}

.customer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

    .customer-grid .full {
        grid-column: 1 / -1;
    }

.form-label.modern-label {
    font-weight: 700;
    color: #243044;
    margin-bottom: 8px;
    font-size: 14px;
}

.modern-input {
    border-radius: 14px;
    border: 1px solid #dde4ee;
    min-height: 50px;
    padding: 13px 15px;
    box-shadow: none !important;
    background: #fff;
    transition: 0.2s ease;
}

    .modern-input:focus {
        border-color: #8fa2c3;
        box-shadow: 0 0 0 3px rgba(31, 63, 117, 0.08) !important;
    }

textarea.modern-input {
    min-height: 120px;
    resize: vertical;
}

.selection-mode-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.mode-badge {
    padding: 9px 13px;
    border-radius: 999px;
    background: #f5f7fa;
    color: #4b5565;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #e8edf3;
}

.block-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 26px 0 16px;
    flex-wrap: wrap;
}

    .block-title h4 {
        margin: 0;
        font-size: 21px;
        font-weight: 800;
        color: #1b2739;
    }

    .block-title .selected-info {
        font-size: 13px;
        font-weight: 700;
        color: #5d687b;
        background: #f7f8fb;
        border: 1px solid #e8edf3;
        border-radius: 999px;
        padding: 8px 12px;
        max-width: 100%;
    }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.selection-card {
    position: relative;
    border: 1px solid #e8edf3;
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    transition: 0.2s ease;
    cursor: pointer;
    overflow: hidden;
    min-height: 100%;
    min-width: 0;
}

    .selection-card:hover {
        border-color: #cfd7e6;
        box-shadow: 0 10px 24px rgba(20, 30, 50, 0.06);
        transform: translateY(-2px);
    }

    .selection-card.selected {
        border-color: #1f3f75;
        box-shadow: 0 12px 28px rgba(31, 63, 117, 0.10);
        background: #fcfdff;
    }

    .selection-card .card-select-indicator {
        position: absolute;
        right: 16px;
        top: 16px;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 2px solid #dbe2ec;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 900;
        color: transparent;
        transition: 0.2s ease;
        background: #fff;
    }

    .selection-card.selected .card-select-indicator {
        background: #1f3f75;
        border-color: #1f3f75;
        color: #fff;
    }

    .selection-card .card-title {
        font-size: 20px;
        font-weight: 800;
        color: #192435;
        margin-bottom: 12px;
        padding-right: 40px;
        line-height: 1.3;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .selection-card .card-price {
        font-size: 28px;
        /*font-weight: 800;*/
        color: #111b2a;
        line-height: 1.1;
        margin-bottom: 14px;
        overflow-wrap: anywhere;
    }

        .selection-card .card-price small {
            font-size: 13px;
            font-weight: 700;
            color: #7b8596;
        }

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.mini-badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #e6ebf2;
    background: #f8fafc;
    color: #485467;
}

    .mini-badge.one-time {
        background: #fff7ed;
        border-color: #fde7c7;
        color: #b76508;
    }

    .mini-badge.piece {
        background: #eefbf3;
        border-color: #d3f0de;
        color: #137146;
    }

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

    .features-list li {
        position: relative;
        padding-left: 22px;
        color: #5e697d;
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

        .features-list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 8px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #1f3f75;
        }

.piece-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
}

    .piece-box .piece-label {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: #31425f;
        margin-bottom: 8px;
    }

    .piece-box .piece-help {
        font-size: 12px;
        color: #71809a;
        margin-top: 8px;
        line-height: 1.5;
    }

.piece-input {
    border-radius: 12px;
    border: 1px solid #dce6f5;
    min-height: 44px;
    box-shadow: none !important;
}

.empty-box {
    border-radius: 16px;
    padding: 22px;
    border: 1px dashed #d8e0ea;
    background: #fafbfd;
    color: #6d7890;
    font-weight: 600;
    text-align: center;
}

.payment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0 18px;
}

.payment-tab {
    border: 1px solid #e1e7f0;
    background: #fff;
    color: #35445f;
    border-radius: 14px;
    padding: 14px 16px;
    min-width: 180px;
    font-weight: 800;
    transition: 0.2s ease;
    text-align: left;
    min-height: 78px;
}

    .payment-tab.active {
        border-color: #1f3f75;
        background: #1f3f75;
        color: #fff;
    }

    .payment-tab .sub {
        display: block;
        font-size: 12px;
        font-weight: 700;
        opacity: 0.85;
        margin-top: 6px;
        line-height: 1.4;
    }

.payment-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.discount-card,
.schedule-card {
    border: 1px solid #e8edf3;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    min-width: 0;
}

    .discount-card h5,
    .schedule-card h5 {
        font-size: 18px;
        font-weight: 800;
        color: #192435;
        margin-bottom: 16px;
    }

.quick-stats {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.quick-stat {
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    padding: 14px 15px;
    min-width: 0;
}

    .quick-stat .label {
        font-size: 12px;
        color: #6e7d95;
        font-weight: 700;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .quick-stat .value {
        font-size: 22px;
        font-weight: 800;
        color: #192435;
        line-height: 1.1;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

.selected-plan-box {
    font-size: 18px !important;
}

.warning-text {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #c05621;
    min-height: 20px;
    line-height: 1.5;
}

.schedule-items {
    display: grid;
    gap: 14px;
}

.installment-row {
    border: 1px solid #e8edf3;
    border-radius: 16px;
    padding: 16px;
    background: #fcfdff;
}

.installment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

    .installment-head .month-title {
        font-size: 16px;
        font-weight: 800;
        color: #192435;
        overflow-wrap: anywhere;
    }

    .installment-head .month-price {
        font-size: 21px;
        font-weight: 800;
        color: #111b2a;
        white-space: nowrap;
    }

.installment-sub {
    font-size: 12px;
    font-weight: 700;
    color: #708097;
    margin-bottom: 10px;
    line-height: 1.5;
}

.installment-lines {
    display: grid;
    gap: 8px;
}

.installment-line {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    padding: 10px 12px;
}

    .installment-line .name {
        font-size: 14px;
        color: #41506c;
        font-weight: 700;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .installment-line .amount {
        font-size: 14px;
        font-weight: 800;
        color: #0f1e35;
        white-space: nowrap;
        flex-shrink: 0;
    }

.billing-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.billing-sidebar {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.billing-card {
    border: 1px solid #e8edf3;
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    min-width: 0;
}

    .billing-card h5 {
        font-size: 18px;
        font-weight: 800;
        color: #192435;
        margin-bottom: 16px;
    }

.billing-actions {
    margin-top: 16px;
}

.billing-download-btn {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    background: #1f3f75;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    transition: 0.2s ease;
}

    .billing-download-btn:hover {
        background: #19345f;
    }

    .billing-download-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.billing-summary-list {
    display: grid;
    gap: 12px;
}

.billing-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #edf1f6;
    background: #fafbfd;
    border-radius: 14px;
    min-width: 0;
}

    .billing-summary-item span {
        font-size: 12px;
        font-weight: 700;
        color: #6f7b90;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .billing-summary-item strong {
        font-size: 15px;
        font-weight: 800;
        color: #1a2436;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

.save-feedback {
    display: none;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

    .save-feedback.show {
        display: block;
    }

    .save-feedback.success {
        background: #ecfdf3;
        border: 1px solid #ccefd8;
        color: #166534;
    }

    .save-feedback.error {
        background: #fff1f2;
        border: 1px solid #fecdd3;
        color: #be123c;
    }

.billing-preview-shell {
    border: 1px solid #e8edf3;
    border-radius: 18px;
    background: #f8f9fc;
    overflow: hidden;
    min-width: 0;
}

.billing-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e8edf3;
    background: #fff;
    font-size: 14px;
    font-weight: 800;
    color: #23314d;
}

.billing-preview-stage {
    padding: 20px;
    overflow: auto;
    max-height: calc(100vh);
    overscroll-behavior: contain;
}

.document-preview-pages {
    display: block;
}

.document-preview-page {
    width: 210mm;
    max-width: 100%;
    height: 297mm;
    margin: 0 auto 18px;
    background: #fff;
    color: #111827;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    border-radius: 8px;
    padding: 18mm 16mm 16mm;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
}

    .document-preview-page:last-child {
        margin-bottom: 0;
        page-break-after: auto;
        break-after: auto;
    }

.pdf-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.pdf-page-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pdf-logo-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 56px;
}

    .pdf-logo-box img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.pdf-logo-fallback {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
}

.pdf-brand-title {
    font-size: 22px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.pdf-brand-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.5;
}

.pdf-page-meta {
    text-align: right;
    font-size: 12px;
    color: #4b5563;
    min-width: 0;
}

.pdf-page-content {
    flex: 1;
    min-height: 0;
}

.pdf-page-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #6b7280;
    flex-shrink: 0;
}

.doc-title {
    font-size: 26px;
    font-weight: 900;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.doc-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 18px;
    line-height: 1.6;
}

.doc-section {
    margin-top: 18px;
    break-inside: avoid;
    page-break-inside: avoid;
}

    .doc-section:first-of-type {
        margin-top: 0;
    }

.doc-section-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.doc-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.doc-info-item {
    padding: 11px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    break-inside: avoid;
    page-break-inside: avoid;
    min-width: 0;
}

    .doc-info-item.full {
        grid-column: 1 / -1;
    }

    .doc-info-item span {
        display: block;
        font-size: 11px;
        font-weight: 800;
        color: #6b7280;
        text-transform: uppercase;
        margin-bottom: 5px;
    }

    .doc-info-item strong {
        font-size: 14px;
        color: #111827;
        font-weight: 700;
        line-height: 1.5;
        white-space: pre-line;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

.doc-table-wrap {
    break-inside: avoid;
    page-break-inside: avoid;
    width: 100%;
    overflow-x: auto;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
}

    .doc-table th,
    .doc-table td {
        border: 1px solid #e5e7eb;
        padding: 9px 11px;
        font-size: 12px;
        text-align: left;
        vertical-align: top;
    }

    .doc-table th {
        background: #f3f4f6;
        font-weight: 800;
        color: #1f2937;
    }

.doc-total-box {
    margin-top: 16px;
    margin-left: auto;
    width: 320px;
    max-width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
}

.doc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

    .doc-total-row:last-child {
        border-bottom: 0;
    }

    .doc-total-row span {
        color: #6b7280;
        font-weight: 700;
    }

    .doc-total-row strong {
        color: #111827;
        font-weight: 800;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .doc-total-row.net {
        background: #eff6ff;
    }

        .doc-total-row.net strong {
            font-size: 18px;
        }

.doc-list {
    margin: 0;
    padding-left: 20px;
}

    .doc-list li {
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 1.6;
        color: #1f2937;
        overflow-wrap: anywhere;
    }

.doc-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-top: 42px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.doc-sign-box {
    text-align: center;
    padding-top: 28px;
    border-top: 1px solid #111827;
    font-size: 14px;
    color: #111827;
    font-weight: 700;
}

.doc-note {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    margin-top: 16px;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow-wrap: anywhere;
}

.wizard-section {
    display: none;
}

    .wizard-section.active {
        display: block;
    }

.wizard-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-top: 1px solid #e8edf3;
}

.bottom-wrap {
    display: grid;
    grid-template-columns: minmax(130px, 160px) minmax(0, 1fr) minmax(130px, 160px);
    grid-template-areas: "prev total next";
    align-items: center;
    gap: 16px;
}

#prevStepBtn {
    grid-area: prev;
}

#nextStepBtn {
    grid-area: next;
}

.wizard-nav-btn {
    min-width: 130px;
    min-height: 50px;
    border-radius: 14px;
    font-weight: 800;
    border: 0;
    transition: 0.2s ease;
}

    .wizard-nav-btn.prev-btn {
        background: #eef2f7;
        color: #22314d;
    }

    .wizard-nav-btn.next-btn {
        background: #1f3f75;
        color: #fff;
    }

    .wizard-nav-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.bottom-total {
    grid-area: total;
    min-width: 0;
    text-align: center;
    border-radius: 18px;
    padding: 10px 20px;
    background: #1b2739;
    color: #fff;
}

    .bottom-total .label {
        display: block;
        font-size: 12px;
        font-weight: 700;
        opacity: 0.8;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 4px;
    }

    .bottom-total .value {
        display: block;
        font-size: clamp(22px, 2vw, 28px);
        font-weight: 800;
        line-height: 1;
        overflow-wrap: anywhere;
    }

    .bottom-total .sub {
        display: block;
        font-size: 12px;
        font-weight: 600;
        opacity: 0.8;
        margin-top: 6px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

.payment-tab.disabled,
.payment-tab:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(.15);
}

@media (max-width: 1399.98px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .payment-layout,
    .billing-layout {
        grid-template-columns: 1fr;
    }

    .billing-preview-stage {
        max-height: calc(100vh - 220px);
    }
}

@media (max-width: 991.98px) {
    .offer-wizard-page {
        padding-bottom: 170px;
    }

    .customer-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .selection-card .card-price {
        font-size: 24px;
    }

    .payment-tab {
        flex: 1 1 calc(50% - 12px);
        min-width: 0;
    }

    .bottom-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "total total"
            "prev next";
    }

    .wizard-nav-btn {
        width: 100%;
        min-width: 0;
    }

    .bottom-total {
        padding: 12px 16px;
    }

    .document-preview-page {
        padding: 14mm 10mm 12mm;
    }

    .doc-info-grid,
    .doc-signatures {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .offer-wizard-page {
        padding-bottom: 195px;
    }

    .wizard-shell {
        padding-top: 20px;
    }

    .section-panel {
        padding: 20px;
        border-radius: 18px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .block-title h4 {
        font-size: 19px;
    }

    .selection-card {
        padding: 18px;
    }

        .selection-card .card-title {
            font-size: 18px;
        }

        .selection-card .card-price {
            font-size: 22px;
        }

    .payment-tabs {
        gap: 10px;
    }

    .payment-tab {
        flex: 1 1 100%;
        width: 100%;
        min-height: unset;
    }

    .discount-card,
    .schedule-card,
    .billing-card {
        padding: 18px;
    }

    .quick-stat .value {
        font-size: 20px;
    }

    .installment-head,
    .installment-line,
    .doc-total-row,
    .pdf-page-footer {
        flex-direction: column;
        align-items: flex-start;
    }

        .installment-head .month-price,
        .installment-line .amount {
            white-space: normal;
        }

    .billing-preview-stage {
        padding: 12px;
        max-height: 70vh;
    }

    .document-preview-page {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 297mm;
        padding: 12mm 8mm 10mm;
    }

    .pdf-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .pdf-page-meta {
        text-align: left;
    }

    .doc-title {
        font-size: 22px;
    }

    .doc-total-box {
        width: 100%;
    }

    .bottom-total .value {
        font-size: 24px;
    }
}

@media (max-width: 575.98px) {
    .offer-wizard-page {
        padding-bottom: 210px;
    }

    .wizard-topbar .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .wizard-steps {
        padding: 14px 0 12px;
    }

    .wizard-step {
        font-size: 13px;
        padding: 9px 13px;
    }

    .section-panel {
        padding: 18px 16px;
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .mode-badge,
    .block-title .selected-info {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .piece-box {
        padding: 12px;
    }

    .discount-card,
    .schedule-card,
    .billing-card {
        padding: 16px;
    }

    .quick-stat {
        padding: 12px 13px;
    }

        .quick-stat .value,
        .selected-plan-box {
            font-size: 18px !important;
        }

    .billing-preview-toolbar {
        padding: 12px 14px;
    }

    .billing-preview-stage {
        padding: 10px;
    }

    .document-preview-page {
        min-height: auto;
        padding: 10mm 7mm 8mm;
        border-radius: 6px;
    }

    .pdf-logo-box {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .pdf-brand-title {
        font-size: 18px;
    }

    .doc-title {
        font-size: 20px;
    }

    .bottom-wrap {
        gap: 12px;
    }

    .bottom-total {
        padding: 12px 14px;
    }

        .bottom-total .label,
        .bottom-total .sub {
            font-size: 11px;
        }

        .bottom-total .value {
            font-size: 22px;
        }
}

@media (max-width: 420.98px) {
    .offer-wizard-page {
        padding-bottom: 250px;
    }

    .bottom-wrap {
        grid-template-columns: 1fr;
        grid-template-areas:
            "total"
            "prev"
            "next";
    }

    .bottom-total {
        text-align: left;
    }

    .wizard-nav-btn {
        min-height: 48px;
    }

    .section-title {
        font-size: 20px;
    }
}

.document-pagination-sandbox {
    position: fixed;
    left: -100000px;
    top: 0;
    width: 210mm;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

    .document-pagination-sandbox .document-preview-page {
        margin: 0 0 18px;
        box-shadow: none;
    }

.doc-flow-heading,
.doc-free-text-block {
    break-inside: avoid;
    page-break-inside: avoid;
}

.page-number-text {
    white-space: nowrap;
}
