.offer-detail-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    min-width: 0;
}

.back-link {
    display: inline-flex;
    margin-bottom: 12px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
}

.offer-detail-hero h1 {
    font-size: 34px;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.offer-detail-hero p {
    color: var(--muted);
    font-size: 16px;
}

.offer-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 22px;
    align-items: start;
    max-width: 100%;
    overflow: hidden;
}

.offer-main,
.offer-side {
    min-width: 0;
}

.offer-main {
    display: grid;
    gap: 20px;
}

.offer-side {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 110px;
}

.detail-panel,
.price-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.detail-panel h2 {
    font-size: 22px;
    margin-bottom: 16px;
}

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

.detail-table div,
.side-row {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.detail-table span,
.side-row span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
}

.detail-table strong,
.side-row strong {
    min-width: 0;
    max-width: 62%;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.text-box {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    color: #334155;
    line-height: 1.65;
}

.two-detail,
.risk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.risk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-detail div,
.risk-card {
    min-width: 0;
    overflow-wrap: anywhere;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 18px;
    background: #f8fafc;
}

.two-detail h3,
.risk-card strong {
    display: block;
    margin-bottom: 10px;
}

.risk-card p,
.two-detail p {
    color: var(--muted);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.risk-card.good {
    background: var(--good-bg);
}

.risk-card.warn {
    background: var(--warn-bg);
}

.risk-card.bad {
    background: var(--danger-bg);
}

.price-card {
    background: linear-gradient(135deg, #111827, #2f333b);
    color: white;
}

.price-card span {
    display: block;
    color: rgba(255, 255, 255, .65);
    margin-bottom: 8px;
}

.price-card strong {
    display: block;
    font-size: 30px;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.price-card p {
    color: rgba(255, 255, 255, .72);
    line-height: 1.45;
}

.status-pill {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-suitable,
.status-selected {
    background: #dcfce7;
    color: #166534;
}

.status-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-selection,
.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-list a {
    min-width: 0;
    display: flex;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    text-decoration: none;
    color: #111827;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.file-list span {
    color: var(--muted);
}

.offer-title-link {
    color: #111827;
    text-decoration: none;
    font-weight: 900;
}

.offer-title-link:hover {
    color: var(--red);
}

@media (max-width: 1500px) {
    .offer-detail-grid {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .offer-side {
        position: static;
    }
}

@media (max-width: 900px) {
    .offer-detail-hero {
        flex-direction: column;
    }

    .detail-table,
    .two-detail,
    .risk-grid {
        grid-template-columns: 1fr;
    }

    .detail-table div,
    .side-row {
        flex-direction: column;
    }

    .detail-table strong,
    .side-row strong {
        max-width: 100%;
        text-align: left;
    }
}