.rfq-page {
    padding: 32px 0 56px;
}

.rfq-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}

.rfq-title {
    margin: 0 0 24px;
    font-size: 34px;
    line-height: 1.1;
}

.rfq-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #eeeeee;
    border-radius: 16px;
    background: transparent;
}

.rfq-alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.rfq-alert-success {
    background: #edf9f0;
    border-color: #b7e1c0;
}

.rfq-alert-warning {
    background: #fff6e5;
    border-color: #f3d08b;
}

.rfq-alert-error {
    background: #fff0f0;
    border-color: #f0b6b6;
}

.rfq-table {
    width: 100%;
    border-collapse: collapse;
}

.rfq-table th,
.rfq-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e8e2d6;
    text-align: left;
    vertical-align: top;
}

.rfq-table th {
    font-weight: 600;
}

.rfq-table th:nth-child(3),
.rfq-table th:nth-child(4),
.rfq-table td:nth-child(3),
.rfq-table td:nth-child(4) {
    white-space: nowrap;
}

.rfq-table tr.rfq-row-parent td {
    border-bottom-color: transparent;
    padding-bottom: 6px;
}

.rfq-table tr.rfq-row-application td {
    padding-top: 4px;
    border-top: 0;
    border-bottom: 0;
}

.rfq-table tr.rfq-row-application-last td {
    border-bottom-color: transparent;
}

.rfq-table tr.rfq-row-group-total td {
    padding-top: 6px;
    border-top: 0;
    font-weight: 700;
}

.rfq-table .rfq-linked-item-cell {
    padding-left: 18px;
}

.rfq-group-total-label {
    text-align: right;
}

/* Строка «N шт. × цена/шт.» под группой (как в документе КП, Quote.html) — жирность наследуется
   от общего .rfq-row-group-total td { font-weight: 700 }, тут ничего не переопределяем. */

.rfq-group-total-value {
    white-space: nowrap;
}

.rfq-application-brief {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-height: 28px;
}

.rfq-application-brief-inline {
    margin-top: 10px;
}

.rfq-value-stack {
    display: flex;
    flex-direction: column;
}

.rfq-value-sub {
    margin-top: 10px;
}

.rfq-application-arrow {
    position: relative;
    flex: 0 0 24px;
    width: 24px;
    min-width: 24px;
    height: 20px;
    margin-top: 0;
}

.rfq-application-arrow::before {
    content: "";
    position: absolute;
    left: 0;
    top: -2px;
    width: 16px;
    height: 10px;
    border-left: 2px solid #d6cebf;
    border-bottom: 2px solid #d6cebf;
    border-bottom-left-radius: 12px;
}

.rfq-application-arrow::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #d6cebf;
    border-right: 2px solid #d6cebf;
    transform: rotate(45deg);
}

.rfq-application-text {
    min-width: 0;
    line-height: 1.35;
}

.rfq-application-text strong {
    margin-right: 0;
}

.rfq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rfq-field {
    display: block;
    margin-bottom: 16px;
}

.rfq-field > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.rfq-required-mark {
    display: inline;
    color: #d33b2f;
    margin-left: 2px;
}

.rfq-field input,
.rfq-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d8d1c2;
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

.rfq-field textarea {
    resize: vertical;
}

.rfq-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 18px;
}

.rfq-actions {
    margin-top: 20px;
}

.rfq-return-actions {
    margin: -8px 0 20px;
}

.rfq-actions-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rfq-button {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--rfq-button-bg, #1e6f5c) !important;
    color: var(--rfq-button-color, #fff) !important;
    text-decoration: none;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.rfq-button:hover {
    background: var(--rfq-button-hover-bg, #165a49) !important;
    color: var(--rfq-button-hover-color, #fff) !important;
}

.rfq-button-secondary,
.rfq-button-danger {
    background: var(--rfq-button-bg, #1e6f5c) !important;
    color: var(--rfq-button-color, #fff) !important;
}

.rfq-button-secondary:hover,
.rfq-button-danger:hover {
    background: var(--rfq-button-hover-bg, #165a49) !important;
    color: var(--rfq-button-hover-color, #fff) !important;
}

.rfq-button-product,
.rfq-button-cart {
    margin-top: 12px;
}

.rfq-cart-box {
    margin-top: 16px;
}

.rfq-cart-hook-box {
    margin-top: 16px;
    text-align: right;
}

.rfq-cart-hook-box .rfq-button-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rfq-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.rfq-quote-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.rfq-quote-card {
    background: #fff;
}

.rfq-quote-brand {
    margin-bottom: 20px;
}

.rfq-quote-company {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.rfq-quote-party {
    min-width: 0;
}

.rfq-quote-subtitle {
    margin: 0 0 10px;
    font-size: 16px;
}

.rfq-quote-note {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-left: 4px solid #1e6f5c;
    background: #f6fbf9;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.rfq-quote-note a,
.rfq-muted a {
    color: #1e6f5c;
    text-decoration: underline;
}

.rfq-quote-table {
    margin-top: 8px;
}

.rfq-quote-total {
    margin-top: 18px;
    text-align: right;
    font-size: 20px;
}

.rfq-request-total {
    margin-top: 18px;
    text-align: right;
    font-size: 20px;
}

.rfq-quote-approval {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.rfq-quote-signature,
.rfq-quote-stamp {
    text-align: right;
}

.rfq-quote-signature img {
    max-width: 220px;
    max-height: 120px;
}

.rfq-quote-stamp img,
.rfq-quote-logo img {
    max-width: 180px;
    max-height: 120px;
}

.rfq-muted {
    color: #6b6b6b;
    font-size: .92em;
}

@media (max-width: 700px) {
    .rfq-title {
        font-size: 28px;
    }

    .rfq-grid {
        grid-template-columns: 1fr;
    }

    .rfq-card {
        padding: 16px;
    }

    .rfq-quote-header,
    .rfq-quote-company {
        grid-template-columns: 1fr;
        display: grid;
    }

    .rfq-actions-inline {
        flex-direction: column;
    }

    .rfq-table th,
    .rfq-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
}

@media print {
    .rfq-page {
        padding: 0;
    }

    .rfq-container {
        max-width: none;
        padding: 0;
    }

    .rfq-card {
        border: 0;
        padding: 0;
        background: #fff;
    }

    .no-print {
        display: none !important;
    }
}
