/* ═══ Tender detail page ═══════════════════════════════════════════ */

/* ── Page wrapper ──────────────────────────────────────────────── */
.tender-page-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ── Breadcrumbs ───────────────────────────────────────────────── */
.offer-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 14px 0 10px; font-size: .8rem; color: #94a3b8; }
.offer-breadcrumbs a { color: #64748b; text-decoration: none; }
.offer-breadcrumbs a:hover { color: #0d9488; }
.offer-breadcrumbs i { font-size: .55rem; color: #cbd5e1; }
.offer-breadcrumbs span { color: #0f172a; font-weight: 600; }

/* ── Sidebar sticky + spacing ──────────────────────────────────── */
.offer-detail__sidebar { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.offer-sidebar-card { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 18px; padding: 20px 22px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.offer-sidebar-card__title { font-size: .72rem; font-weight: 800; color: #0f172a; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; gap: 7px; }
.offer-sidebar-card__title i { color: #14b8a6; font-size: .85rem; }

/* ── Sidebar price card ─────────────────────────────────────────── */
.offer-sidebar-card--price { background: #fff; border: 2px solid rgba(20,184,166,.2); border-radius: 20px; box-shadow: 0 4px 20px rgba(20,184,166,.08); position: relative; overflow: hidden; }
.offer-sidebar-card--price::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg,#14b8a6,#0891b2); }
.tender-sb-price-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #64748b; margin-bottom: 8px; }
.tender-sb-price { font-size: 2rem; font-weight: 900; color: #0d9488; line-height: 1.15; margin-bottom: 18px; letter-spacing: -1px; }
.tender-sb-price__cur { font-size: .95rem; font-weight: 600; color: #64748b; margin-left: 4px; }
.tender-sb-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 16px; background: linear-gradient(135deg,#14b8a6,#0891b2); color: #fff; border-radius: 12px; font-size: .9rem; font-weight: 700; text-decoration: none; transition: opacity .15s, transform .15s; margin-bottom: 10px; box-sizing: border-box; }
.tender-sb-btn:hover { opacity: .92; transform: translateY(-1px); }
.tender-sb-platform { text-align: center; font-size: .75rem; color: #64748b; display: flex; align-items: center; justify-content: center; gap: 5px; }
.tender-sb-platform i { color: #94a3b8; }
.tender-sb-platform-link { color: #0d9488; text-decoration: none; font-size: .775rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.tender-sb-platform-link:hover { text-decoration: underline; }

/* ── Timeline ───────────────────────────────────────────────────── */
.tender-timeline { display: flex; flex-direction: column; }
.tender-tl-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #f1f5f9; }
.tender-tl-row:last-child { border-bottom: none; }
.tender-tl-row--hi { background: #fef9c3; border-radius: 8px; margin: 4px -8px; padding: 8px 8px; border-bottom: none; }
.tender-tl-row__k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; flex-shrink: 0; }
.tender-tl-row__v { font-size: .825rem; font-weight: 800; color: #0f172a; text-align: right; }
.tender-days { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 700; padding: 7px 10px; border-radius: 8px; margin: 6px 0 2px; width: 100%; box-sizing: border-box; }
.tender-days--ok  { background: #dcfce7; color: #166534; }
.tender-days--warn{ background: #fef9c3; color: #92400e; }
.tender-days--exp { background: #fee2e2; color: #991b1b; }

/* ── Contact buttons ────────────────────────────────────────────── */
.rq-org-contact-btn { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; color: #0d9488; font-size: .825rem; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s; margin-bottom: 6px; }
.rq-org-contact-btn:last-child { margin-bottom: 0; }
.rq-org-contact-btn:hover { background: #f0fdfa; border-color: #99f6e4; }
.rq-org-contact-btn i { color: #14b8a6; font-size: .8rem; flex-shrink: 0; }

/* ── Category pills sidebar ─────────────────────────────────────── */
.tender-cat-pill { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: #374151; padding: 6px 0; border-bottom: 1px solid #f8fafc; font-weight: 500; }
.tender-cat-pill:last-child { border-bottom: none; padding-bottom: 0; }
.tender-cat-pill i { color: #14b8a6; font-size: .6rem; }

/* ── Org block in sidebar ───────────────────────────────────────── */
.offer-org-full { display: flex; flex-direction: column; gap: 4px; }
.offer-org-full__logo { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; border: 1.5px solid #e5e7eb; margin-bottom: 8px; }
.offer-org-full__name { font-size: .9375rem; font-weight: 800; color: #0f172a; line-height: 1.3; }
.offer-org-full__name a { color: #0f172a; text-decoration: none; }
.offer-org-full__name a:hover { color: #0d9488; }
.offer-org-full__city { font-size: .775rem; color: #64748b; margin-top: 2px; }

/* ── Title block ────────────────────────────────────────────────── */
.offer-title-block__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tender-title-row { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; }
.tender-title-logo { width: 80px; height: 80px; object-fit: contain; border-radius: 12px; border: 1.5px solid #e5e7eb; background: #fff; flex-shrink: 0; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.offer-title { font-size: 1.625rem; font-weight: 900; color: #0f172a !important; margin: 0; line-height: 1.25; letter-spacing: -.3px; }

/* ── Badges ─────────────────────────────────────────────────────── */
.offer-type-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; line-height: 1; }
.offer-type--work    { background: #dbeafe; color: #1d4ed8; }
.offer-type--product { background: #dcfce7; color: #166534; }
.offer-type--service { background: #fef9c3; color: #92400e; }
/* Номер закупки */
.tender-badge--num { background: #1e293b; color: #e2e8f0; border: 1.5px solid #334155; }

/* ── Специальные бейджи тендера ─────────────────────────────────── */
/* Государственный */
.tender-badge--gov   { background: #ede9fe; color: #5b21b6; border: 1.5px solid #c4b5fd; }
/* Коммерческий */
.tender-badge--com   { background: #fff7ed; color: #c2410c; border: 1.5px solid #fed7aa; }
/* Метод закупки */
.tender-badge--method{ background: #f0fdfa; color: #0d9488; border: 1.5px solid #99f6e4; }
/* МСП */
.tender-badge--smp   { background: #f0fdf4; color: #15803d; border: 1.5px solid #86efac; }
/* Премиум/ТОП */
.tender-badge--top   { background: #fef9c3; color: #854d0e; border: 1.5px solid #fde68a; }
/* Статус */
.tender-status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; line-height: 1; }
.tender-st--pub    { background: #dcfce7; color: #166534; border: 1.5px solid #86efac; }
.tender-st--done   { background: #f1f5f9; color: #475569; border: 1.5px solid #cbd5e1; }
.tender-st--cancel { background: #fee2e2; color: #991b1b; border: 1.5px solid #fca5a5; }
.tender-st--mod    { background: #fef9c3; color: #854d0e; border: 1.5px solid #fde68a; }
.tender-st--draft  { background: #f8fafc; color: #94a3b8; border: 1.5px solid #e2e8f0; }

/* ── Meta pills ─────────────────────────────────────────────────── */
.offer-meta-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; border: 1px solid transparent; text-decoration: none; white-space: nowrap; line-height: 1; transition: opacity .15s; }
.offer-meta-pill:hover { opacity: .82; }
.offer-meta-pill--cat     { background: #CCFBF1; color: #0d9488; border-color: #5eead4; }
.offer-meta-pill--views   { background: #EDE9FE; color: #6D28D9; border-color: #C4B5FD; }
.offer-meta-pill--date    { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.offer-meta-pill--created { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }

/* ── Tabs ───────────────────────────────────────────────────────── */
.offer-tabs { display: flex; gap: 2px; border-bottom: 2px solid #e5e7eb; padding-top: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.offer-tabs::-webkit-scrollbar { display: none; }
.offer-tab { display: inline-flex; align-items: center; gap: 5px; padding: 8px 13px; font-size: .8rem; font-weight: 700; color: #64748b; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; transition: all .15s; white-space: nowrap; }
.offer-tab:hover { color: #0d9488; background: #f0fdfa; }
.offer-tab.active { color: #0d9488; border-bottom-color: #14b8a6; background: #fff; }
.rq-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; background: #14b8a6; color: #fff; font-size: .65rem; font-weight: 800; border-radius: 9px; }

/* ── Sections ───────────────────────────────────────────────────── */
.offer-section { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 16px; padding: 26px 28px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.035); scroll-margin-top: 120px; }
.offer-section__title { font-size: 1rem; font-weight: 900; color: #0f172a; margin: 0 0 20px; display: flex; align-items: center; gap: 9px; padding-bottom: 14px; border-bottom: 2px solid #f1f5f9; }
.offer-section__title i { color: #14b8a6; font-size: .95rem; }
.offer-section__subtitle { font-size: .72rem; font-weight: 800; color: #374151; text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.offer-section__subtitle i { color: #14b8a6; }

/* ── Quote block ────────────────────────────────────────────────── */
.offer-short-desc { display: flex; gap: 12px; background: linear-gradient(135deg,#f0fdfa,#f0f9ff); border: 1.5px solid #a7f3d0; border-radius: 12px; padding: 16px 20px; font-size: .9375rem; line-height: 1.65; color: #1e293b; }
.offer-short-desc__icon { color: #14b8a6; font-size: 1rem; opacity: .7; flex-shrink: 0; margin-top: 2px; }

/* ── Body text (full_description) ──────────────────────────────── */
.tender-body-text { font-size: .9375rem; line-height: 1.75; color: #374151; }
.tender-body-text h1,.tender-body-text h2 { font-size: 1.0625rem; font-weight: 800; color: #0f172a; margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 1.5px solid #f1f5f9; }
.tender-body-text h3 { font-size: .9375rem; font-weight: 700; color: #1e293b; margin: 18px 0 8px; }
.tender-body-text h4,.tender-body-text h5,.tender-body-text h6 { font-size: .875rem; font-weight: 700; color: #374151; margin: 14px 0 6px; }
.tender-body-text p { margin: 0 0 12px; }
.tender-body-text ul,.tender-body-text ol { padding-left: 22px; margin: 0 0 14px; }
.tender-body-text li { margin-bottom: 5px; }
.tender-body-text strong { color: #0f172a; }
.tender-body-text a { color: #0d9488; }

/* ── Condition fields (offer-qf) ────────────────────────────────── */
.offer-qf { display: flex; align-items: flex-start; gap: 14px; background: #f8fafc; border: 1.5px solid #f1f5f9; border-radius: 12px; padding: 14px 16px; }
.offer-qf > i { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,#f0fdfa,#e0f2fe); color: #0d9488; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .875rem; }
.offer-qf__l { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; margin-bottom: 3px; }
.offer-qf__v { font-size: .9rem; font-weight: 700; color: #1e293b; }

/* ── SME badge ──────────────────────────────────────────────────── */
.tender-smp-badge { display: inline-flex; align-items: center; gap: 8px; background: #dcfce7; color: #166534; border: 1.5px solid #86efac; border-radius: 8px; padding: 8px 14px; font-size: .8125rem; font-weight: 700; margin-top: 14px; }
.tender-smp-badge i { color: #16a34a; }

/* ── Обеспечение grid ───────────────────────────────────────────── */
.offer-org-full__rekvizity { display: grid; gap: 12px; background: #f8fafc; border-radius: 14px; padding: 16px; border: 1.5px solid #f1f5f9; }
.offer-org-rekvizit { display: flex; flex-direction: column; gap: 3px; }
.offer-org-rekvizit__label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; }
.offer-org-rekvizit__val { font-size: .9375rem; font-weight: 700; color: #0f172a; }

/* ── Files ──────────────────────────────────────────────────────── */
.tender-files-list { display: flex; flex-direction: column; gap: 8px; }
.tender-file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f8fafc; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 12px 16px; }
.tender-file-row:hover { border-color: #a7f3d0; background: #f0fdfa; }
.tender-file-row__info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tender-file-row__icon { color: #ef4444; font-size: 1.25rem; flex-shrink: 0; }
.tender-file-row__name { font-size: .875rem; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tender-file-row__desc { font-size: .75rem; color: #64748b; margin-top: 2px; }
.tender-file-row__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: #14b8a6; color: #fff; border-radius: 8px; font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: background .15s; }
.tender-file-row__btn:hover { background: #0d9488; }

/* ── Tags ───────────────────────────────────────────────────────── */
.tender-tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tender-tag-pill { padding: 5px 13px; background: #e0f2fe; color: #0369a1; border: 1.5px solid #bae6fd; border-radius: 6px; font-size: .8rem; font-weight: 600; }

/* ── Related tender cards (reuse org-request-card pattern) ──────── */
.org-request-card { display: block; background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; text-decoration: none; transition: border-color .15s, box-shadow .15s; margin-bottom: 10px; }
.org-request-card:last-child { margin-bottom: 0; }
.org-request-card:hover { border-color: #a7f3d0; box-shadow: 0 4px 14px rgba(20,184,166,.1); }
.org-request-card__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.org-request-budget { font-size: .8rem; font-weight: 700; color: #0d9488; margin-left: auto; }
.org-request-card__title { font-size: .9rem; font-weight: 700; color: #0f172a; line-height: 1.4; margin-bottom: 8px; }
.org-request-card__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .75rem; color: #64748b; }
.org-request-card__meta i { color: #14b8a6; margin-right: 3px; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .offer-detail__sidebar { position: static; }
}
@media (max-width: 768px) {
    .offer-detail__layout { grid-template-columns: 1fr !important; }
    .offer-detail__layout > aside { order: -1; }
    .offer-section { padding: 18px 16px; }
    .tender-sb-price { font-size: 1.5rem; }
}

