@import url("styles.css?v=23b159780b"); /* версия — tools/bump_asset_versions.py */

/* ============================================================
   Tanlo — app surface: catalog (/app/), my tenders, tender detail.
   Redesign 2026-09-29: dense row list instead of a card grid, filter
   sidebar with accordions (drawer below 900px), active-filter chips and a
   result count above the list — the working screen of a procurement tool,
   not a landing page. All controls come from tokens/ui.css.
   ============================================================ */

/* ---------- Skip-link (A11Y-1): виден только по фокусу с клавиатуры ---------- */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; padding: 8px 12px; background: var(--surface-card); color: var(--text-strong); border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); text-decoration: none; }
.skip-link:focus { left: 8px; outline: 2px solid var(--text-strong); }

/* Честное ожидание фоновой сборки ИИ-разбора (UX-9a) */
.ai-pending { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text-body); font-size: var(--step-body-sm); line-height: 1.5; }
.ai-pending .spinner { flex-shrink: 0; margin-top: 3px; }
.ai-pending .elapsed { color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.tab .lock { display: inline-flex; align-items: center; gap: 3px; font-size: var(--step-caption); color: var(--text-subtle); }

/* ---------- Page scaffold ---------- */
.catalog { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-9); box-sizing: border-box; }
.catalog-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.catalog-head h1 { font-family: var(--font-display); font-size: var(--step-h2); font-weight: var(--weight-bold); letter-spacing: var(--ls-h2); color: var(--text-strong); margin: 0; }
.catalog-head .stats { font-size: var(--step-caption); color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.catalog-head .stats b { color: var(--text-muted); font-weight: var(--weight-semibold); }

/* search row */
.search-row { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.search-row .input-icon { flex: 1; min-width: 0; }
.search-row .btn-filters { display: inline-flex; }
.search-row .btn-filters .cnt { background: var(--text-strong); color: var(--bg-elevated); border-radius: var(--radius-pill); font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
.search-row .btn-filters .cnt:empty { display: none; }
@media (min-width: 900px) { .search-row .btn-filters { display: none; } }

.quick-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: var(--space-3); }
.quick-row .label { font-size: var(--step-caption); color: var(--text-subtle); margin-right: 2px; }
.fchip.quick { background: var(--surface-card); cursor: pointer; }
.fchip.quick.on { background: var(--text-strong); color: var(--bg-elevated); border-color: var(--text-strong); }
.fchip.quick.on .k { color: inherit; }

.active-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: var(--space-3); min-height: 0; }
.active-row:empty { display: none; }

/* ---------- Layout ---------- */
.app-layout { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.filters-sidebar { width: 100%; } /* базовое правило стоит ДО desktop-медиа: иначе перебивало width:272px и сайдбар растягивался на всю ширину */
.results-main { width: 100%; min-width: 0; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.results-head .count { font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); font-variant-numeric: tabular-nums; }
.results-head .count b { color: var(--text-strong); font-weight: var(--weight-semibold); }
.results-head .sort { display: flex; align-items: center; gap: 8px; font-size: var(--step-caption); color: var(--text-subtle); }
.results-head .sort select { width: auto; height: var(--control-h-sm); font-size: var(--step-caption); padding-right: 30px; }

@media (min-width: 900px) {
  .app-layout { flex-direction: row; gap: var(--space-5); }
  .filters-sidebar { width: 272px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + var(--space-3)); max-height: calc(100vh - var(--header-h) - var(--space-6)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .results-main { flex: 1; }
}

/* ---------- Filters (sidebar / drawer) ---------- */
.filter-panel { background: var(--surface-card); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); padding: 4px var(--space-4) var(--space-3); }
.filter-panel .acc > .acc-body { gap: 8px; }
.filter-panel .field { gap: 5px; }
.filter-panel .field-label { font-size: 11px; }
/* UX-аудит п. 6: архив — строка-ссылка на тариф вместо радио с замком; «Ещё фильтры» — одна секция */
.archive-link { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-bottom: var(--border-width) solid var(--border-subtle); font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-link); text-decoration: none; line-height: 1.4; }
.archive-link svg { flex-shrink: 0; color: var(--text-subtle); }
.archive-link:hover { color: var(--text-link-hover); }
.archive-link[hidden], .acc[hidden] { display: none; }
.acc-more > .acc-body { gap: 14px; }
.filter-actions { display: flex; flex-direction: column; gap: 8px; padding-top: var(--space-3); }
.filter-actions .btn { justify-content: flex-start; }
.filter-actions .btn.btn-block { justify-content: center; }
.drawer-head, .drawer-foot { display: none; }
.drawer-backdrop { display: none; }

@media (max-width: 899px) {
  .filters-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(100%, 360px); background: var(--surface-card); z-index: 95; display: flex; flex-direction: column; transform: translateX(-100%); transition: transform var(--dur-slow) var(--ease-out); box-shadow: var(--shadow-lg); }
  .filters-sidebar.open { transform: translateX(0); }
  .drawer-backdrop { display: block; }
  .drawer-head { display: flex; }
  .drawer-foot { display: flex; }
  .filter-panel { border: 0; border-radius: 0; flex: 1; overflow-y: auto; padding: 0 16px 16px; }
  .filter-actions { padding-bottom: var(--space-2); }
  @media (prefers-reduced-motion: reduce) { .filters-sidebar { transition: none; } }
}

/* ---------- Result rows ---------- */
.tlist { background: var(--surface-card); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); overflow: hidden; }
.trow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main amount" "main deadline"; gap: 2px var(--space-3); padding: 12px var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); transition: background-color var(--dur-fast) var(--ease-standard); }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: color-mix(in oklab, var(--surface-sunken) 55%, var(--surface-card)); }
.trow-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-right: 40px; }
.trow-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 18px; }
.trow-title { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--step-body); line-height: 1.35; letter-spacing: -0.005em; color: var(--text-strong); margin: 0; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.trow-title::after { content: ""; position: absolute; inset: 0; }
.trow-title:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.trow-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-muted); line-height: 1.4; }
.trow-meta .m { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.trow-meta .m svg { color: var(--text-subtle); flex-shrink: 0; }
.trow-meta .m span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-meta .m.buyer span { max-width: 52ch; }
.trow-meta .m.lot { font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); }
.trow-amount { grid-area: amount; text-align: right; white-space: nowrap; font-family: var(--num-font); font-size: 17px; font-weight: var(--weight-bold); letter-spacing: var(--num-ls); color: var(--text-strong); font-variant-numeric: tabular-nums lining-nums; line-height: 1.2; }
.trow-amount .cur { font-family: var(--font-body); font-size: var(--step-caption); font-weight: var(--weight-regular); letter-spacing: 0; color: var(--text-muted); margin-left: 3px; }
.trow-amount.none { font-family: var(--font-body); font-weight: var(--weight-regular); font-size: var(--step-caption); color: var(--text-subtle); }
.trow-deadline { grid-area: deadline; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
/* <900px: название на всю ширину (padding-right под звёздочку), сумма и срок — второй строкой; иначе nowrap-сумма сжимала название до 120px */
@media (max-width: 899px) {
  .trow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "amount deadline"; align-items: center; gap: 6px var(--space-3); }
  .trow-amount { text-align: left; font-size: 16px; }
  .trow-deadline { flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; }
}
.trow-deadline .dl { font-size: var(--step-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.track-btn { position: absolute; top: 9px; right: 8px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-subtle); cursor: pointer; padding: 0; border-radius: var(--radius-sm); z-index: 2; transition: var(--transition-control); }
.track-btn:hover { background: var(--surface-sunken); color: var(--text-body); }
.track-btn::after { content: ""; position: absolute; inset: -6px; }
.track-btn.tracked { color: var(--text-brand); }
.track-btn:disabled { opacity: 0.55; cursor: not-allowed; }

@media (min-width: 900px) {
  .trow { grid-template-columns: minmax(0, 1fr) 150px 130px 40px; grid-template-areas: "main amount deadline star"; align-items: start; gap: var(--space-4); padding: 12px var(--space-3) 12px var(--space-4); }
  .trow-main { padding-right: 0; }
  .track-btn { position: relative; top: auto; right: auto; grid-area: star; justify-self: end; } /* НЕ static: иначе .track-btn::after (inset:-6px) позиционируется от .trow и накрывает всю строку — любой клик по тендеру «добавлял в избранное» вместо открытия карточки (баг 30.09) */
  .trow-deadline { align-items: flex-end; }
}
@media (min-width: 1200px) {
  .trow { grid-template-columns: minmax(0, 1fr) 170px 150px 40px; }
  .trow-amount { font-size: 18px; }
}

/* category chip on rows (compact) */
.cat-chip { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-family: var(--font-body); font-size: var(--step-caption); font-weight: var(--weight-medium); }
.cat-chip .cat-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 5px; }
.cat-chip .cat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.cat-blue { color: var(--state-info-fg); } .cat-blue .cat-icon { background: var(--state-info-bg); }
.cat-green { color: var(--state-success-fg); } .cat-green .cat-icon { background: var(--state-success-bg); }
.cat-amber { color: var(--state-warning-fg); } .cat-amber .cat-icon { background: var(--state-warning-bg); }
.cat-tan { color: var(--tan-700); } .cat-tan .cat-icon { background: var(--surface-tan-soft); }
:root[data-theme="dark"] .cat-tan { color: var(--accent-tan); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-tan { color: var(--accent-tan); } }
.cat-neutral { color: var(--text-muted); } .cat-neutral .cat-icon { background: var(--surface-sunken); }

/* skeleton rows */
.trow-skeleton { padding: 14px var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); display: grid; gap: 8px; }
.trow-skeleton .sk-line:nth-child(1) { width: 70%; height: 14px; }
.trow-skeleton .sk-line:nth-child(2) { width: 45%; }
.trow-skeleton .sk-line:nth-child(3) { width: 30%; }

/* legacy grid card (kept for embeds) */
.card { position: relative; background: var(--surface-card); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); padding: var(--space-4); display: flex; flex-direction: column; }
.card-skeleton { height: 120px; border-radius: var(--radius-card); border: var(--border-width) solid var(--border-subtle); background: linear-gradient(100deg, var(--skeleton-base) 40%, var(--skeleton-sheen) 50%, var(--skeleton-base) 60%); background-size: 200% 100%; animation: tanlo-shimmer 1.2s linear infinite; }
.empty, .loading { text-align: center; color: var(--text-muted); font-family: var(--font-body); font-size: var(--step-body); padding: var(--space-9) var(--space-4); }

/* ---------- Saved searches (workspace) ---------- */
.ss-row { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-4); border-bottom: var(--border-width) solid var(--border-subtle); }
.ss-row:last-child { border-bottom: 0; }
.ss-row .ss-main { flex: 1; min-width: 0; }
.ss-row .ss-label { font-weight: var(--weight-semibold); color: var(--text-strong); font-size: var(--step-body-sm); }
.ss-row .ss-desc { font-size: var(--step-caption); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-row .ss-actions { display: flex; gap: 4px; }
.delete-search-btn { position: relative; }
.delete-search-btn::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max(100%, 44px); height: 44px; }

/* ---------- Tender detail ---------- */
.detail { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-9); box-sizing: border-box; }
.detail-hero { margin-bottom: var(--space-4); }
.detail-hero .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-title { font-family: var(--font-display); font-size: var(--step-h2); font-weight: var(--weight-bold); letter-spacing: var(--ls-h2); line-height: 1.25; color: var(--text-strong); margin: 0; text-wrap: pretty; overflow-wrap: anywhere; }
.detail-original-title { margin: 8px 0 0; font-size: var(--step-caption); line-height: 1.5; color: var(--text-subtle); overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); overflow: hidden; margin: var(--space-4) 0; }
.metric { background: var(--surface-card); padding: 12px 14px; min-width: 0; }
.metric dt { font-family: var(--font-body); font-size: var(--step-micro); text-transform: uppercase; letter-spacing: var(--ls-micro); font-weight: var(--weight-semibold); color: var(--text-subtle); margin: 0 0 4px; }
.metric dd { margin: 0; font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); overflow-wrap: anywhere; }
.metric.amount dd { font-family: var(--num-font); font-size: 22px; font-weight: var(--weight-bold); letter-spacing: var(--num-ls); color: var(--text-strong); font-variant-numeric: tabular-nums lining-nums; }
.metric.amount dd .cur { font-family: var(--font-body); font-size: var(--step-caption); font-weight: 400; letter-spacing: 0; color: var(--text-muted); margin-left: 4px; }
.metric.deadline dd { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.metric.deadline dd .badge { font-size: 12px; }
@media (min-width: 700px) { .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.detail-actions-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-top: var(--space-3); }
.detail-actions-bar .btn.track-toggle.tracked { color: var(--text-brand); border-color: var(--text-brand); }

.detail-layout { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.detail-main { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.detail-sidebar { width: 100%; display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 960px) {
  .detail-layout { flex-direction: row; gap: var(--space-6); }
  .detail-main { flex: 1; }
  .detail-sidebar { width: 320px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + var(--space-3)); }
}
.detail-card { background: var(--surface-card); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); padding: var(--space-5); overflow-wrap: anywhere; }
.detail-card.compact { padding: var(--space-4); }
.section-title { font-family: var(--font-display); font-size: var(--step-h3); letter-spacing: var(--ls-h3); font-weight: var(--weight-semibold); color: var(--text-strong); margin: 0 0 var(--space-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title .icon { color: var(--text-subtle); flex-shrink: 0; }
.section-tabs { margin-bottom: var(--space-4); }
.ai-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; background: var(--state-info-bg); color: var(--state-info-fg); padding: 2px 8px; border-radius: 999px; font-family: var(--font-body); font-weight: var(--weight-semibold); }
.ai-summary-text { font-family: var(--font-body); font-size: var(--step-body); color: var(--text-body); line-height: 1.6; margin: 0 0 var(--space-3); }
.key-points { margin: 0; padding-left: 1.2em; font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); }
.key-points li { margin-bottom: 6px; }
.risk-note { margin-top: var(--space-3); padding: 12px 14px; background: var(--state-warning-bg); color: var(--state-warning-fg); border-radius: var(--radius-md); font-size: var(--step-body-sm); display: flex; gap: 8px; align-items: flex-start; }
.risk-note .icon { flex-shrink: 0; margin-top: 2px; }
.ai-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin: 0 0 var(--space-3); padding: 12px 14px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.ai-facts dt { font-family: var(--font-body); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 0 0 2px; }
.ai-facts dd { margin: 0; font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); }
.ai-block { margin-top: var(--space-3); }
.ai-block h4 { margin: 0 0 6px; font-family: var(--font-body); font-size: var(--step-body-sm); font-weight: var(--weight-semibold); color: var(--text-strong); display: flex; align-items: center; gap: 6px; }
.ai-block h4 .icon { color: var(--text-subtle); }
.ai-block ul { margin: 0; padding-left: 1.2em; font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); }
.ai-block li { margin-bottom: 4px; }
.ai-block.risks ul { color: var(--state-warning-fg); }
.ai-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: var(--space-3); font-family: var(--font-body); font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.doc-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.doc-name .icon { color: var(--text-subtle); flex-shrink: 0; }
.doc-list, .qual-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: var(--border-width) solid var(--border-subtle); }
.doc-list li:last-child { border-bottom: none; }
.doc-list a { color: var(--text-link); text-decoration: none; font-weight: var(--weight-semibold); font-size: var(--step-body-sm); }
.doc-list a:hover { text-decoration: underline; }
.doc-size { color: var(--text-muted); font-size: var(--step-caption); white-space: nowrap; }
.qual-list li { padding: 8px 0 8px 24px; position: relative; font-size: var(--step-body-sm); color: var(--text-body); border-bottom: var(--border-width) solid var(--border-subtle); }
.qual-list li:last-child { border-bottom: none; }
.qual-list li::before { content: "✓"; position: absolute; left: 0; color: var(--state-success-fg); font-weight: bold; }
.skeleton { color: var(--text-muted); font-size: var(--step-body-sm); font-style: italic; }
.unsupported-note { background: var(--surface-sunken); color: var(--text-body); padding: 12px 14px; border-radius: var(--radius-md); font-size: var(--step-body-sm); line-height: 1.5; }
.unsupported-note a { color: var(--text-link); }
.concentration-row { margin-bottom: var(--space-3); }
.concentration-row-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-strong); margin-bottom: 4px; gap: 8px; }
.concentration-row-head b { font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.concentration-bar { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.concentration-bar-fill { height: 100%; background: var(--tan-500); border-radius: 999px; }
.concentration-row-meta { font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-muted); margin-top: 3px; }
.doc-gen-list { display: flex; flex-direction: column; }
.doc-gen-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: var(--border-width) solid var(--border-subtle); font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); }
.doc-gen-row:last-child { border-bottom: none; }
.doc-gen-row a { color: var(--text-link); text-decoration: none; font-weight: var(--weight-semibold); white-space: nowrap; }
.doc-gen-row a:hover { text-decoration: underline; }
.doc-gen-pending { color: var(--text-subtle); font-size: var(--step-caption); white-space: nowrap; }
.chat-divider { margin: 18px 0; border-top: var(--border-width) solid var(--border-subtle); }
.chat-log { max-height: 280px; overflow-y: auto; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { padding: 8px 10px; border-radius: var(--radius-md); font-size: var(--step-body-sm); max-width: 85%; line-height: 1.45; }
.chat-msg.user { margin-left: auto; background: var(--surface-tan-soft); color: var(--text-body); }
.chat-msg.assistant { background: var(--surface-sunken); color: var(--text-body); }
.chat-row { display: flex; gap: 8px; }
.chat-row .control { flex: 1; }
.err-inline { color: var(--state-urgent-fg); margin-top: 8px; font-size: 13px; }

/* cost estimate (unchanged structure, tokens only) */
.cost-intro { font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); line-height: 1.55; margin: 0 0 var(--space-3); }
.cost-progress { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: var(--step-body-sm); color: var(--text-body); padding: 12px 14px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.cost-spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--text-brand); border-radius: 50%; animation: tanlo-spin 0.9s linear infinite; flex-shrink: 0; }
.cost-verdict { padding: 12px 14px; border-radius: var(--radius-md); font-family: var(--font-body); font-size: var(--step-body-sm); display: flex; gap: 8px; align-items: flex-start; margin-bottom: var(--space-3); }
.cost-verdict .icon { flex-shrink: 0; margin-top: 2px; }
.cost-verdict.fits { background: var(--state-success-bg); color: var(--state-success-fg); }
.cost-verdict.tight { background: var(--state-warning-bg); color: var(--state-warning-fg); }
.cost-verdict.exceeds { background: var(--state-urgent-bg); color: var(--state-urgent-fg); }
.cost-verdict.unknown { background: var(--surface-sunken); color: var(--text-body); }
.cost-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 var(--space-3); padding: 0; }
.cost-tile { background: var(--surface-sunken); border-radius: var(--radius-md); padding: 12px; min-width: 0; }
.cost-tile dt { font-family: var(--font-body); font-size: var(--step-micro); text-transform: uppercase; letter-spacing: var(--ls-micro); font-weight: var(--weight-semibold); color: var(--text-subtle); margin: 0 0 6px; }
.cost-tile dd { margin: 0; font-family: var(--num-font); font-variant-numeric: tabular-nums lining-nums; font-weight: var(--weight-bold); color: var(--text-strong); font-size: 17px; letter-spacing: var(--num-ls); overflow-wrap: anywhere; }
.cost-tile.likely dd { font-size: 20px; }
.cost-tile .usd { display: block; font-family: var(--font-body); font-weight: 400; font-size: var(--step-caption); color: var(--text-muted); margin-top: 2px; }
.cost-meta { font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-muted); margin: 0 0 var(--space-3); line-height: 1.5; }
.cost-sub { font-family: var(--font-display); font-size: var(--step-body); font-weight: var(--weight-semibold); color: var(--text-strong); margin: var(--space-4) 0 8px; }
.cost-table-wrap { overflow-x: auto; }
.cost-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-body); }
.cost-table th { text-align: left; font-size: var(--step-micro); text-transform: uppercase; letter-spacing: var(--ls-micro); color: var(--text-subtle); font-weight: var(--weight-semibold); padding: 6px 8px 6px 0; border-bottom: var(--border-width) solid var(--border-strong); white-space: nowrap; }
.cost-table td { padding: 8px 8px 8px 0; border-bottom: var(--border-width) solid var(--border-subtle); vertical-align: top; }
.cost-table tr:last-child td { border-bottom: none; }
.cost-table td.num, .cost-table th.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; padding-right: 0; padding-left: 8px; }
.cost-table tr.total td { font-weight: var(--weight-semibold); color: var(--text-strong); border-top: var(--border-width) solid var(--border-strong); }
.cost-item-note { display: block; color: var(--text-muted); margin-top: 3px; font-size: var(--step-micro); line-height: 1.45; }
.cost-item-note a { color: var(--text-link); text-decoration: none; }
.cost-item-note a:hover { text-decoration: underline; }
.cost-conf { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-subtle); vertical-align: middle; }
.cost-conf.high { background: var(--state-success-bg); color: var(--state-success-fg); }
.cost-conf.medium { background: var(--state-info-bg); color: var(--state-info-fg); }
.cost-conf.low { background: var(--state-warning-bg); color: var(--state-warning-fg); }
.cost-list { margin: 0; padding-left: 1.2em; font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-body); line-height: 1.5; }
.cost-list li { margin-bottom: 4px; }
details.cost-details { margin-top: var(--space-3); }
details.cost-details summary { cursor: pointer; font-family: var(--font-body); font-size: var(--step-body-sm); font-weight: var(--weight-semibold); color: var(--text-strong); }
.cost-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-width) solid var(--border-subtle); }
.cost-disclaimer { font-family: var(--font-body); font-size: var(--step-micro); color: var(--text-muted); line-height: 1.5; margin: var(--space-3) 0 0; }
.cost-quota { font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-muted); margin: 8px 0 0; }
.cost-conf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-muted); margin: 0 0 var(--space-3); }
.cost-table .my-col { background: var(--surface-sunken); }
.cost-table th.my-col { padding-right: 8px; }
.cost-table td.my-col { padding-right: 8px; }
.cost-table input.my-price { width: 120px; box-sizing: border-box; padding: 6px 8px; border: var(--border-width) solid var(--border-strong); border-radius: 6px; background: var(--surface-card); color: var(--text-strong); font: inherit; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.cost-table input.my-price::placeholder { color: var(--text-subtle); opacity: 0.7; }
.cost-table input.my-price:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--corp-accent); }
.cost-table tfoot td { border-bottom: none; }
.cost-table td.my-compare { font-size: var(--step-caption); color: var(--text-body); padding-top: 4px; }
.cost-table td.my-compare.over { color: var(--state-urgent-fg); font-weight: var(--weight-semibold); }
.my-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; font-size: var(--step-caption); }
.my-tools input.my-pct { width: 56px; padding: 5px 6px; border: var(--border-width) solid var(--border-strong); border-radius: 6px; background: var(--surface-card); color: var(--text-strong); font: inherit; text-align: right; }
.cost-table tr.dropped td { opacity: 0.55; text-decoration: line-through; }
.cost-table tr.dropped td .cost-item-note { text-decoration: none; }
/* 27.10.2026 (Ришад: «всё сжато, первую колонку ужми»): в таблице позиций описание
   не забирает всю ширину — цифрам и «Моей цене» остаётся воздух. */
@media (min-width: 641px) {
  .cost-table.cost-items th:first-child, .cost-table.cost-items td:first-child { width: 40%; padding-right: 20px; }
  .cost-table.cost-items td.num, .cost-table.cost-items th.num { padding-left: 20px; }
  .cost-table.cost-items td.my-col, .cost-table.cost-items th.my-col { padding-left: 14px; padding-right: 14px; }
  .cost-table.cost-items td.num br + b { display: inline-block; margin-top: 2px; }
  .cost-table.cost-items input.my-price { width: 128px; }
  .cost-table.cost-items tfoot td { padding-top: 12px; }
}
.cost-flag { display: block; color: var(--state-warning-fg); font-size: var(--step-micro); margin-top: 3px; }
.cost-issues { margin: 0; padding-left: 1.2em; font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-body); line-height: 1.5; }
.cost-issues li { margin-bottom: 5px; }
.cost-issues .sev { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; margin-right: 4px; vertical-align: middle; }
.cost-issues .sev.high { background: var(--state-urgent-bg); color: var(--state-urgent-fg); }
.cost-issues .sev.medium { background: var(--state-warning-bg); color: var(--state-warning-fg); }
.cost-issues .sev.low { background: var(--surface-sunken); color: var(--text-subtle); }
.sup-groups { display: flex; flex-direction: column; gap: var(--space-3); }
.sup-group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--font-body); font-size: var(--step-body-sm); font-weight: var(--weight-semibold); color: var(--text-strong); margin-bottom: 8px; }
.sup-group-items { font-family: var(--font-body); font-size: var(--step-micro); color: var(--text-muted); font-weight: 400; }
.sup-level { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--state-info-bg); color: var(--state-info-fg); font-weight: var(--weight-semibold); }
.sup-level.uz { background: var(--state-success-bg); color: var(--state-success-fg); }
.sup-level.world { background: var(--surface-sunken); color: var(--text-subtle); }
.sup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sup-card { background: var(--surface-sunken); border-radius: var(--radius-md); padding: 12px 14px; min-width: 0; font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-body); line-height: 1.5; }
.sup-card .sup-name { font-size: var(--step-body-sm); font-weight: var(--weight-semibold); color: var(--text-strong); display: block; margin-bottom: 2px; overflow-wrap: anywhere; }
.sup-card .sup-kind { color: var(--text-muted); font-size: var(--step-micro); display: block; margin-bottom: 6px; }
.sup-card .sup-contact { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.sup-card .sup-contact a { color: var(--text-link); }
.sup-card .sup-covers, .sup-card .sup-price { color: var(--text-muted); font-size: var(--step-micro); margin-top: 6px; }
.sup-empty { font-family: var(--font-body); font-size: var(--step-caption); color: var(--text-muted); }
@media (max-width: 640px) { .sup-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cost-tiles { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .cost-table.stack thead { display: none; }
  .cost-table.stack tr { display: block; padding: 8px 0; border-bottom: var(--border-width) solid var(--border-subtle); }
  .cost-table.stack tr:last-child { border-bottom: none; }
  .cost-table.stack td { display: block; border: none; padding: 2px 0; text-align: left; white-space: normal; }
  .cost-table.stack td.num { padding-left: 0; }
  .cost-table.stack td.num::before { content: attr(data-label) ": "; color: var(--text-subtle); font-size: var(--step-micro); text-transform: uppercase; letter-spacing: var(--ls-micro); }
  .cost-table.stack td.num br { display: none; }
  .cost-table.stack td.num br + b { margin-left: 8px; }
  .cost-table.stack td.my-col { background: none; padding: 4px 0; }
  .cost-table.stack input.my-price { width: 100%; max-width: 220px; margin-top: 2px; font-size: 16px; }
  .cost-table.stack tfoot td.num { text-align: left; }
  .cost-table.stack tr.total { border-top: var(--border-width) solid var(--border-strong); }
}

/* ---------- Workspace (my tenders / account) ---------- */
.ws { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-9); box-sizing: border-box; }
.ws-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.ws-head h1 { font-family: var(--font-display); font-size: var(--step-h2); font-weight: var(--weight-bold); letter-spacing: var(--ls-h2); color: var(--text-strong); margin: 0; }
.ws-head .sub { font-size: var(--step-body-sm); color: var(--text-muted); margin-top: 2px; }
.ws-tabs { margin-bottom: var(--space-4); }
.ws-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
@media (min-width: 960px) { .ws-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.ws-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); overflow: hidden; margin-bottom: var(--space-4); }
@media (min-width: 700px) { .ws-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ws-stat { background: var(--surface-card); padding: 12px 14px; text-decoration: none; color: inherit; display: block; }
.ws-stat:hover { background: var(--surface-sunken); text-decoration: none; color: inherit; }
.ws-stat .lbl { font-size: var(--step-micro); text-transform: uppercase; letter-spacing: var(--ls-micro); font-weight: var(--weight-semibold); color: var(--text-subtle); margin-bottom: 4px; }
.ws-stat .val { font-family: var(--num-font); font-size: 22px; font-weight: var(--weight-bold); letter-spacing: var(--num-ls); color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ws-stat .val.urgent { color: var(--state-urgent-fg); }
.ws-stat .sub { font-size: var(--step-caption); color: var(--text-muted); margin-top: 2px; }
.ws-section { margin-bottom: var(--space-5); }
.ws-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ws-section-head h2 { font-family: var(--font-display); font-size: var(--step-body-lg); font-weight: var(--weight-semibold); color: var(--text-strong); margin: 0; display: flex; align-items: center; gap: 8px; }
.ws-section-head h2 .count { font-size: var(--step-caption); color: var(--text-subtle); background: var(--surface-sunken); border-radius: var(--radius-pill); padding: 1px 8px; font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); }
.ws-group-label { font-size: var(--step-micro); text-transform: uppercase; letter-spacing: var(--ls-micro); font-weight: var(--weight-semibold); color: var(--text-subtle); padding: 10px var(--space-4) 4px; background: var(--surface-sunken); border-bottom: var(--border-width) solid var(--border-subtle); }
.ws-group-label.urgent { color: var(--state-urgent-fg); }

/* forms in account */
.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.form-grid .span2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; margin-top: var(--space-3); }
.form-msg { font-size: var(--step-caption); }
.form-msg.ok { color: var(--state-success-fg); } .form-msg.err { color: var(--state-urgent-fg); }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row .control { flex: 1; min-width: 0; }
.plan-hero { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.plan-hero .plan-name { font-family: var(--font-display); font-size: var(--step-h3); font-weight: var(--weight-bold); color: var(--text-strong); }
.feature-rows { display: flex; flex-direction: column; }
.feature-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: var(--border-width) solid var(--border-subtle); font-size: var(--step-body-sm); }
.feature-row:last-child { border-bottom: 0; }
.feature-row .fr-name { color: var(--text-strong); font-weight: var(--weight-medium); }
.feature-row .fr-sub { font-size: var(--step-caption); color: var(--text-muted); }
.feature-row .fr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.member-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: var(--border-width) solid var(--border-subtle); font-size: var(--step-body-sm); }
.member-row:last-child { border-bottom: 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }

/* Страница тендера: гость видит одну понятную карточку вместо трёх «войдите» (UX-аудит 05.10). */
.guest-gate .section-title { margin-bottom: var(--space-3); }
.guest-gate-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.guest-gate-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-body); line-height: 1.45; }
.guest-gate-list li svg { flex-shrink: 0; margin-top: 2px; color: var(--state-success-fg); }
.guest-gate-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.guest-gate-note { margin: var(--space-3) 0 0; font-size: var(--step-caption); }
/* 06.10: гость видит описание/требования/файлы, ниже — компактный призыв. */
.guest-gate-compact .section-title { margin-bottom: var(--space-2); flex-wrap: nowrap; align-items: flex-start; }
.guest-gate-compact .section-title .icon { margin-top: 0.2em; }
.guest-gate-text { margin: 0 0 var(--space-3); color: var(--text-body); font-size: var(--step-body-sm); line-height: 1.45; }
.doc-list .doc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-list .doc-main > a:first-child { overflow-wrap: anywhere; }
.doc-list a.doc-gate-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-weight: var(--weight-medium); font-size: var(--step-caption); }
.doc-list a.doc-gate-hint:hover { color: var(--text-link); }
.tender-description { white-space: pre-line; color: var(--text-body); line-height: 1.55; }
/* Телефон: цена во всю ширину (раньше «≈», число и «сум» разваливались на три строки),
   главная кнопка — на всю ширину, остальные — в ряд. */
@media (max-width: 699px) {
  .metrics .metric.amount { grid-column: 1 / -1; }
  .detail-actions-bar .btn-primary { flex: 1 1 100%; justify-content: center; }
  .detail-actions-bar .btn-outline, .detail-actions-bar .btn-ghost { flex: 1 1 0; justify-content: center; }
}

/* Каталог: действия над выдачей — рядом со счётчиком (раньше прятались внизу фильтров
   с обрезанным текстом); валюта — здесь же, а не в шапке сайта (UX-аудит 05.10). */
.results-tools { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
#fxMount .fx-select select { height: var(--control-h-sm); font-size: var(--step-caption); }
@media (max-width: 699px) {
  .results-head { align-items: stretch; }
  .results-tools { width: 100%; }
  .results-tools .sort { margin-left: auto; }
}
@media (max-width: 699px) {
  .hide-sm { display: none; }
  .results-tools #exportBtn { display: none; }
  .results-tools .sort { flex: 1 1 0; min-width: 0; }
  .results-tools .sort select { width: 100%; }
  /* Быстрые фильтры — одной прокручиваемой строкой, а не в три ряда. */
  .quick-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--space-4)); padding-right: var(--space-4); }
  .quick-row::-webkit-scrollbar { display: none; }
  .quick-row .fchip { flex-shrink: 0; }
}
