:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #fafbfd;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text: #0f172a;
    --text-muted: #64748b;
    --text-soft: #475569;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: rgba(37, 99, 235, 0.08);
    --teal-bg: #e7f6f8;
    --teal-border: #9ad3dc;
    --teal-fg: #0f766e;
    --success-bg: rgba(134, 239, 172, 0.24);
    --success-fg: #166534;
    --warn-bg: rgba(253, 224, 71, 0.28);
    --warn-fg: #854d0e;
    --warn-border: rgba(202, 138, 4, 0.3);
    --soft-bg: rgba(99, 102, 241, 0.08);
    --soft-fg: #4338ca;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-pop: 0 16px 40px rgba(15, 23, 42, 0.18);
    --radius: 14px;
    --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; min-height: 100vh; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; }
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.switcher { position: sticky; top: 0; z-index: 50; background: var(--bg); padding: 14px 24px 0; border-bottom: 1px solid var(--border); }
.switcher__inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding-bottom: 14px; }
.switcher h1 { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.switcher__sep { flex: 1; }
.tab-row { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-card); }
.tab-row button { padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); transition: all 0.15s; display: inline-flex; align-items: center; gap: 7px; }
.tab-row button:hover { color: var(--text); }
.tab-row button.is-active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

.screen { display: none; }
.screen.is-active { display: block; }
.page { max-width: 1400px; margin: 0 auto; padding: 22px 24px 80px; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; transition: all 0.15s; white-space: nowrap; height: 38px; }
.btn:hover { background: var(--slate-100); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3); }
.btn--ghost { border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--warn { background: #fff; color: var(--warn-fg); border: 1px solid var(--warn-border); }
.btn--warn:hover { background: var(--warn-bg); }

.crumbs { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.crumbs span { color: var(--slate-300); margin: 0 6px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; background: var(--slate-100); color: var(--text-soft); }
.pill--ok { background: var(--success-bg); color: var(--success-fg); }
.pill--soft { background: var(--soft-bg); color: var(--soft-fg); }
.pill--unknown { background: var(--warn-bg); color: var(--warn-fg); }
.pill--brand { background: var(--brand-soft); color: var(--brand); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pill--no-dot::before { display: none; }

.s-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.s-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.s-head__sub { color: var(--text-muted); max-width: 580px; font-size: 14px; }
.s-head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.s-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: flex-start; }
@media (max-width: 1100px) { .s-grid { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 22px 24px; margin-bottom: 14px; }
.card__head { margin-bottom: 14px; }
.card__title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card__num { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.card__title { font-size: 16px; font-weight: 700; flex: 1; }
.card__hint { font-size: 13px; color: var(--text-muted); margin-left: 38px; }

.fld { margin-bottom: 14px; }
.fld:last-child { margin-bottom: 0; }
.fld__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.fld__label .opt { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.input, .textarea, .select { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 14px; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { resize: vertical; min-height: 76px; }
.fld__sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }

.sku-list { display: flex; flex-direction: column; gap: 8px; }
.sku-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s; }
.sku-wrap.is-open { border-color: var(--brand-soft); background: #fbfcfe; }
.sku-wrap.is-warn { background: var(--warn-bg); border-color: var(--warn-border); }
/* Сетка под 5 реальных детей строки артикула: имя | кол-во | уверенность | раскрыть | удалить.
   (Раньше было 6 колонок с первой 32px под drag-handle, которого нет в разметке — из-за чего
   имя попадало в 32px, а количество — в 1fr и разъезжалось.) */
.sku-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px 116px 34px 34px; gap: 10px; align-items: center; padding: 10px 12px; }
.sku-row__main { min-width: 0; }  /* позволяет имени/подписи сжиматься, не переполняя строку */
@media (max-width: 560px) {
  /* Узкий экран: имя на всю ширину, ниже — кол-во | уверенность | раскрыть | удалить. */
  .sku-row { grid-template-columns: 92px minmax(0, 1fr) 34px 34px; row-gap: 8px; }
  .sku-row__main { grid-column: 1 / -1; }
}
.sku-row__expand { width: 30px; height: 30px; color: var(--text-muted); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.sku-row__expand:hover { background: var(--slate-100); color: var(--brand); }
.sku-row__expand .icon { transition: transform .2s; }
.sku-wrap.is-open .sku-row__expand .icon { transform: rotate(180deg); color: var(--brand); }
.sku-detail { display: none; padding: 4px 14px 16px 14px; border-top: 1px dashed var(--border); margin: 0 12px; }
.sku-wrap.is-open .sku-detail { display: block; }
.sku-detail h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 700; margin: 14px 0 8px; }
.sku-detail h5:first-child { margin-top: 12px; }
.sku-detail__sub { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.sku-detail .grid-22 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .sku-detail .grid-22 { grid-template-columns: 1fr; } }
.mini-fld { display: flex; flex-direction: column; gap: 4px; }
.mini-fld__label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.mini-input { padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; }
.mini-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text-soft); cursor: pointer; user-select: none; }
.radio-pill:hover { border-color: var(--brand); color: var(--brand); }
.radio-pill.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.radio-pill__dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--slate-300); flex-shrink: 0; }
.radio-pill.is-on .radio-pill__dot { border-color: var(--brand); background: radial-gradient(var(--brand) 0 4px, transparent 5px); }
.variants-tbl { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.variants-tbl__head, .variants-tbl__row { display: grid; grid-template-columns: 1fr 90px 130px 24px; gap: 8px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.variants-tbl__head { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.variants-tbl__row input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 12.5px; width: 100%; }
.variants-tbl__row input:focus { outline: none; border-color: var(--brand); }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cbx { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-size: 12.5px; cursor: pointer; user-select: none; color: var(--text-soft); }
.cbx:hover { border-color: var(--brand); color: var(--brand); }
.cbx.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.cbx__box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--slate-300); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cbx.is-on .cbx__box { background: var(--brand); border-color: var(--brand); }
.cbx__box .icon { width: 9px; height: 9px; color: #fff; opacity: 0; }
.cbx.is-on .cbx__box .icon { opacity: 1; }
.sku-row__handle__legacy { display: none; }
.sku-row__handle { color: var(--slate-300); cursor: grab; }
.sku-row__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.sku-row__chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: var(--slate-100); color: var(--text-soft); font-weight: 500; }
.sku-row__chip--soft { background: var(--brand-soft); color: var(--brand-dark); }
.work-detail--sub { background: var(--surface-2); color: var(--text-soft); border: 1px dashed var(--border); padding: 14px; margin-top: 8px; display: none; flex-direction: column; gap: 12px; align-items: stretch; }
.work-detail--sub.is-open { display: flex; }
.work-detail--sub .lab { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 700; }
.help-line { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.help-line .icon { color: var(--brand); width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; }
.mix-cbx { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; user-select: none; margin-top: 12px; width: 100%; }
.mix-cbx.is-on { background: var(--brand-soft); border-color: var(--brand); }
.mix-cbx__box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--slate-300); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mix-cbx.is-on .mix-cbx__box { background: var(--brand); border-color: var(--brand); }
.mix-cbx__box .icon { width: 11px; height: 11px; color: #fff; opacity: 0; }
.mix-cbx.is-on .mix-cbx__box .icon { opacity: 1; }
.mix-cbx__main { flex: 1; }
.mix-cbx__title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.mix-cbx__sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dates-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .dates-row { grid-template-columns: 1fr; } }
.date-bx { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.date-bx__lbl { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.date-bx__val { font-weight: 600; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.date-bx__val .icon { color: var(--brand); }
.date-bx__sub { font-size: 11.5px; color: var(--text-muted); }
.date-bx--soft { background: var(--surface-2); }
.cycle-banner { padding: 10px 14px; background: var(--soft-bg); color: var(--soft-fg); border-radius: 10px; font-size: 12.5px; margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.cycle-banner b { color: var(--soft-fg); }
.cycle-banner .icon { color: var(--soft-fg); width: 14px; height: 14px; }
.sku-row__main input { background: transparent; border: none; padding: 4px 0; font-weight: 500; width: 100%; }
.sku-row__main input:focus { outline: none; }
.sku-row__sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; display: flex; align-items: center; gap: 4px; }
.sku-row__sub input { background: transparent; border: none; padding: 0; font-size: 11.5px; color: var(--text-muted); width: 100%; }
.sku-row__qty input { width: 100%; text-align: right; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sku-row__qty input:focus { outline: none; border-color: var(--brand); }
.sku-row__select { font-size: 12px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); width: 100%; }
.sku-row__del { width: 32px; height: 32px; color: var(--text-muted); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.sku-row__del:hover { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.sku-add { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 13px; padding: 8px 0; }

.sku-totals { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-top: 10px; background: var(--brand-soft); border-radius: 10px; font-size: 13px; }
.sku-totals__num { font-weight: 700; font-size: 18px; color: var(--brand); margin-right: 4px; }
.sku-totals__lbl { color: var(--brand-dark); font-weight: 500; }
.sku-totals__sep { color: var(--slate-300); }

.works { display: flex; flex-wrap: wrap; gap: 8px; }
.work-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 11px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text-soft); transition: all 0.15s; user-select: none; }
.work-chip:hover { border-color: var(--brand); color: var(--brand); }
.work-chip__check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--slate-300); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.work-chip__check .icon { width: 11px; height: 11px; color: #fff; opacity: 0; }
.work-chip.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.work-chip.is-on .work-chip__check { background: #fff; border-color: #fff; }
.work-chip.is-on .work-chip__check .icon { opacity: 1; color: var(--brand); }

.work-detail { margin-top: 12px; padding: 12px 14px; background: var(--brand-soft); border-radius: 10px; font-size: 12.5px; color: var(--brand-dark); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.work-detail b { color: var(--brand); }

.dest-list { display: flex; flex-direction: column; gap: 8px; }
.dest-row { display: grid; grid-template-columns: auto 1fr 130px 32px; gap: 10px; align-items: center; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.dest-row__icon { width: 32px; height: 32px; border-radius: 8px; background: var(--soft-bg); color: var(--soft-fg); display: inline-flex; align-items: center; justify-content: center; }
.dest-row__title { font-weight: 600; font-size: 13.5px; }
.dest-row__sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.dest-row__qty input { width: 100%; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.dest-row__del { width: 32px; height: 32px; color: var(--text-muted); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }

.upload-zone { display: block; border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 20px; text-align: center; background: var(--surface-2); color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.upload-zone:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.upload-zone .icon { width: 22px; height: 22px; color: var(--brand); margin-bottom: 6px; }
.upload-zone b { color: var(--text); }
.upload-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

/* AI-intake: понятность (per-file статус, успех, подсветка заполненного помощником). */
.ai-files-result { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12.5px; }
.ai-file-ok { color: #15803d; }
.ai-file-err { color: #b91c1c; }
.ai-file-row { display: flex; align-items: center; gap: 6px; }
.ai-success { background: var(--success-bg); border: 1px solid #86efac; border-radius: 10px; padding: 12px 14px; margin-top: 10px; color: #14532d; }
.ai-success__t { font-weight: 700; }
.ai-success__sum { font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
/* Кремовый фон AI-подсветки — ТОЛЬКО для полей ввода и строк (не перебиваем выбранные чипы,
   иначе белый текст is-on оказывался на светлом фоне → нечитаемо). element+class бьёт .input/
   .select/.textarea по специфичности — !important не нужен. */
input.ai-filled, select.ai-filled, textarea.ai-filled { background: #fff7ed; box-shadow: inset 3px 0 0 var(--brand); }
.sku-wrap.ai-filled, .dest-row.ai-filled { background: #fff7ed; box-shadow: inset 3px 0 0 var(--brand); }
/* Чипы/лейблы (work-chip, «Откуда повезём», «Нужен забор»): только обводка-индикатор AI —
   фон и белый текст состояния is-on остаются читаемыми. */
.work-chip.ai-filled, .mix-cbx.ai-filled { outline: 2px solid var(--brand); outline-offset: 2px; }
.upload-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.upload-item__icon { width: 28px; height: 28px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.upload-item__name { flex: 1; font-weight: 500; }
.upload-item__name span { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.upload-item__del { color: var(--text-muted); padding: 4px; border-radius: 4px; }
.upload-item__select { font-size: 11.5px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); }

.who-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.who-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.who-item__name { font-weight: 600; font-size: 13.5px; }
.who-item__sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.who-toggle { display: inline-flex; background: var(--slate-100); border-radius: 999px; padding: 3px; }
.who-toggle button { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.who-toggle button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1); }
.who-toggle button.is-active.is-them { color: var(--brand); }
.who-toggle button.is-active.is-us { color: var(--soft-fg); }

.s-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.readiness { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px; }
.readiness h3 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.readiness__sub { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.readiness__bar { position: relative; height: 6px; border-radius: 999px; background: var(--slate-100); margin-bottom: 12px; overflow: hidden; }
.readiness__bar__fill { height: 100%; width: 70%; background: linear-gradient(90deg, var(--success-fg), #16a34a); border-radius: 999px; }
.readiness__list { display: flex; flex-direction: column; gap: 8px; }
.r-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.r-item__icon { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; }
.r-item--ok .r-item__icon { background: var(--success-bg); color: var(--success-fg); }
.r-item--ok .r-item__icon .icon { width: 11px; height: 11px; }
.r-item--ok span { color: var(--text-soft); }
.r-item--ask .r-item__icon { background: var(--warn-bg); color: var(--warn-fg); }
.r-item--ask .r-item__icon .icon { width: 11px; height: 11px; }
.r-item--ask span { color: var(--text-soft); }
.r-item--ask em { color: var(--warn-fg); font-style: normal; font-weight: 600; }
.r-item--miss .r-item__icon { background: var(--slate-100); color: var(--text-muted); }
.r-item--miss span { color: var(--text-muted); }

.preview-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.preview-card__icon { width: 32px; height: 32px; border-radius: 8px; background: var(--teal-bg); color: var(--teal-fg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.preview-card h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.preview-card p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.preview-card .lnk { color: var(--brand); font-size: 12.5px; font-weight: 600; cursor: pointer; }

.commit-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.commit-card__row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.commit-card .btn--primary { width: 100%; justify-content: center; height: 42px; }
.commit-card__hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.ff-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.ff-head__main h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ff-head__id { font-size: 14px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ff-head__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; color: var(--text-muted); }
.ff-head__meta b { color: var(--text); }
.ff-head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.banner { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.banner__icon { flex-shrink: 0; }
.banner__icon .icon { width: 22px; height: 22px; }
.banner--warn .banner__icon { color: var(--warn-fg); }
.banner__text { flex: 1; font-size: 13.5px; }
.banner__text b { font-weight: 700; }
.banner--warn .banner__text { color: #6b3d04; }
.banner__text p { line-height: 1.55; }
.banner__text p + p { margin-top: 4px; }

.ff-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: flex-start; }
@media (max-width: 1100px) { .ff-grid { grid-template-columns: 1fr; } }

.ff-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }

.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px 20px; margin-bottom: 12px; }
.fcard__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fcard__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.fcard__sp { flex: 1; }

.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
.kv__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.kv__value { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4; }
.kv__value .pill { margin-left: 4px; }

.ftbl-wrap { overflow-x: auto; }
.ftbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 720px; }
.ftbl thead th { background: var(--slate-50); color: var(--text-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; text-align: left; font-weight: 700; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.ftbl thead th:first-child { padding-left: 4px; }
.ftbl thead th:last-child { text-align: right; padding-right: 4px; }
.ftbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ftbl tbody td:first-child { padding-left: 4px; }
.ftbl tbody td:last-child { text-align: right; padding-right: 4px; }
.ftbl tbody tr:last-child td { border-bottom: none; }
.ftbl-row__name { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.ftbl-row__sub { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.ftbl-row__qty { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ftbl-row__qty--unknown { color: var(--warn-fg); }
.ftbl-tot { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 12px 4px 0; font-size: 13px; border-top: 1px solid var(--border); margin-top: 4px; }
.ftbl-tot b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.ftbl-tot__warn { color: var(--warn-fg); font-weight: 600; }

.fworks { display: flex; flex-wrap: wrap; gap: 8px; }
.fwork { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; font-weight: 500; border: 1px solid rgba(37, 99, 235, 0.18); }
.fwork__icon { color: var(--brand); }

.fdest-list { display: flex; flex-direction: column; gap: 8px; }
.fdest { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.fdest__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--soft-bg); color: var(--soft-fg); display: inline-flex; align-items: center; justify-content: center; }
.fdest__name { font-weight: 600; font-size: 14px; }
.fdest__sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.fdest__qty { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--text); }

.fwho-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fwho { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.fwho__name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.fwho__owner { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.fwho__owner--us { background: var(--soft-bg); color: var(--soft-fg); }
.fwho__owner--them { background: var(--brand-soft); color: var(--brand); }

.ffiles { display: flex; flex-direction: column; gap: 6px; }
.ffile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.ffile__icon { width: 28px; height: 28px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ffile__name { flex: 1; font-weight: 600; }
.ffile__name span { color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.ffile__tag { font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--slate-100); color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.ffile__open { color: var(--brand); padding: 4px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; }

.tl { display: flex; flex-direction: column; gap: 10px; position: relative; }
.tl::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--slate-200); }
.tl-item { position: relative; padding-left: 28px; font-size: 13px; }
.tl-item::before { content: ''; position: absolute; left: 4px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); z-index: 1; }
.tl-item--system::before { border-color: var(--slate-300); }
.tl-item__time { color: var(--text-muted); font-size: 11.5px; margin-bottom: 2px; }
.tl-item__author { font-weight: 600; }
.tl-item__author--seller { color: var(--brand); }

.gaps-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px; }
.gaps-card h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.gaps-card__sub { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

.gap { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.gap:first-of-type { border-top: none; padding-top: 0; }
.gap__icon { width: 26px; height: 26px; border-radius: 7px; background: var(--warn-bg); color: var(--warn-fg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gap__icon--soft { background: var(--slate-100); color: var(--text-muted); }
.gap__main { flex: 1; }
.gap__title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.gap__sub { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.5; }
.gap__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gap__btn { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); border: none; }
.gap__btn:hover { background: rgba(37, 99, 235, 0.16); }
.gap__btn--ghost { background: transparent; color: var(--text-muted); }
.gap__btn--ghost:hover { background: var(--slate-100); color: var(--text); }

.decide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px 18px; }
.decide h3 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.decide__sub { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.decide__btns { display: flex; flex-direction: column; gap: 8px; }
.decide__btns .btn { width: 100%; justify-content: flex-start; height: 42px; }
.decide__btns .btn--primary { background: #16a34a; }
.decide__btns .btn--primary:hover { background: #15803d; }

.ask-compose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px; }
.ask-compose h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.ask-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ask-row { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; color: var(--text-soft); display: flex; align-items: flex-start; gap: 8px; }
.ask-row__num { color: var(--brand); font-weight: 700; flex-shrink: 0; }
.ask-row__del { margin-left: auto; color: var(--text-muted); padding: 2px 4px; border-radius: 4px; font-size: 11px; }
.ask-compose textarea { width: 100%; min-height: 60px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; background: var(--surface); resize: vertical; }
.ask-compose__send { margin-top: 10px; width: 100%; justify-content: center; }

/* ============= NEW: sub-step nav ============= */
.substep { background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 24px 0; position: sticky; top: 53px; z-index: 40; }
.substep__inner { max-width: 1400px; margin: 0 auto; display: flex; gap: 6px; align-items: center; padding-bottom: 10px; overflow-x: auto; }
.substep__inner::-webkit-scrollbar { display: none; }
.sstep { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); border: 1px solid transparent; white-space: nowrap; transition: all .15s; }
.sstep:hover { color: var(--text); background: var(--slate-100); }
.sstep.is-active { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.sstep__num { width: 18px; height: 18px; border-radius: 50%; background: var(--slate-200); color: var(--text-muted); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.sstep.is-active .sstep__num { background: var(--brand); color: #fff; }
.sstep__sep { color: var(--slate-300); font-size: 16px; }

.step-screen { display: none; }
.step-screen.is-active { display: block; }

/* ============= NEW: landing for outside seller ============= */
.hero { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #4338ca 100%); color: #fff; border-radius: 18px; padding: 32px 36px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,0.06); }
.hero::after { content: ''; position: absolute; right: 80px; bottom: -100px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.04); }
.hero__chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,0.16); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; position: relative; z-index: 1; }
.hero__chip__dot { width: 7px; height: 7px; border-radius: 50%; background: #86efac; box-shadow: 0 0 0 4px rgba(134,239,172,.22); }
.hero h1 { font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; max-width: 720px; position: relative; z-index: 1; }
.hero__sub { font-size: 15.5px; line-height: 1.55; color: rgba(255,255,255,.86); max-width: 640px; position: relative; z-index: 1; }
.hero__bullets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 18px; max-width: 760px; position: relative; z-index: 1; }
.hero__bullet { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255,255,255,.94); }
.hero__bullet svg { color: #86efac; flex-shrink: 0; margin-top: 2px; }

.flow-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
@media (max-width: 900px) { .flow-steps { grid-template-columns: repeat(2, 1fr); } }
.flow-step { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; position: relative; }
.flow-step__num { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.flow-step__t { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.flow-step__s { font-size: 12px; color: var(--text-muted); line-height: 1.45; }

/* ============= identification block ============= */
.ident { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 22px 24px; }
.ident__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.ident__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-bg); color: var(--teal-fg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ident__icon svg { width: 22px; height: 22px; }
.ident__head h2 { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.ident__head p { font-size: 13px; color: var(--text-muted); }
.ident__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .ident__grid { grid-template-columns: 1fr; } }
.tg-status { padding: 14px 16px; border-radius: 12px; background: var(--teal-bg); border: 1px solid var(--teal-border); color: var(--teal-fg); display: flex; gap: 12px; align-items: center; margin-top: 14px; font-size: 13px; }
.tg-status__icon { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--teal-fg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tg-status__main { flex: 1; line-height: 1.45; }
.tg-status__main b { font-weight: 700; }
.tg-status--gray { background: var(--slate-50); border-color: var(--border); color: var(--text-soft); }
.tg-status--gray .tg-status__icon { color: var(--text-muted); }
.tg-status--ok { background: var(--success-bg); border-color: rgba(22,101,52,.18); color: var(--success-fg); }
.tg-status--ok .tg-status__icon { color: var(--success-fg); }

/* ============= anti-dup state demo ============= */
.dup-banner { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; display: flex; gap: 12px; align-items: flex-start; }
.dup-banner__icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(251,146,60,.18); color: #c2410c; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dup-banner__main { flex: 1; }
.dup-banner__main b { font-weight: 700; }
.dup-banner__main p { color: #9a3412; line-height: 1.5; font-size: 13px; margin: 2px 0 10px; }
.dup-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dup-banner .btn--primary { background: #ea580c; }
.dup-banner .btn--primary:hover { background: #c2410c; }
.dup-reason { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.dup-reason__t { font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }

/* ============= Где товар + Excel ============= */
.where-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 14px; }
.where-pill { padding: 10px 12px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-soft); transition: all .15s; }
.where-pill:hover { border-color: var(--brand); color: var(--brand); }
.where-pill.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.where-pill__icon { width: 22px; height: 22px; border-radius: 6px; background: var(--slate-100); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.where-pill.is-on .where-pill__icon { background: var(--brand); color: #fff; }

.excel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 780px) { .excel-grid { grid-template-columns: 1fr; } }
.excel-card { padding: 16px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.excel-card--good { border-color: rgba(22,101,52,.22); background: rgba(134,239,172,.10); }
.excel-card--soft { border-style: dashed; background: var(--surface-2); }
.excel-card__top { display: flex; align-items: center; gap: 10px; }
.excel-card__icon { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.excel-card--good .excel-card__icon { background: rgba(22,101,52,.16); color: var(--success-fg); }
.excel-card--soft .excel-card__icon { background: var(--slate-100); color: var(--text-muted); }
.excel-card:not(.excel-card--good):not(.excel-card--soft) .excel-card__icon { background: var(--brand-soft); color: var(--brand); }
.excel-card__t { font-weight: 700; font-size: 13.5px; }
.excel-card__s { font-size: 12px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.excel-card .btn { width: 100%; justify-content: center; height: 34px; font-size: 12.5px; }

/* ============= Sent confirmation ============= */
.sent-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-card); padding: 36px; text-align: center; margin-bottom: 16px; }
.sent-card__icon { width: 64px; height: 64px; border-radius: 18px; background: var(--success-bg); color: var(--success-fg); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.sent-card__icon svg { width: 32px; height: 32px; stroke-width: 2.5; }
.sent-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.sent-card__sub { font-size: 14.5px; color: var(--text-muted); line-height: 1.55; max-width: 540px; margin: 0 auto; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 900px) { .status-grid { grid-template-columns: repeat(2, 1fr); } }
.status-bx { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.status-bx__lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.status-bx__val { font-size: 22px; font-weight: 700; line-height: 1.1; }
.status-bx__sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.status-bx--live { background: var(--brand-soft); border-color: rgba(37,99,235,.18); }
.status-bx--live .status-bx__val { color: var(--brand); }
.status-bx__live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 4px; box-shadow: 0 0 0 4px rgba(37,99,235,.18); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.link-card { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.link-card__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.link-card__main { flex: 1; }
.link-card__t { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.link-card__s { font-size: 12px; color: var(--text-muted); }
.link-card__url { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12.5px; color: var(--text); padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; margin-top: 6px; display: inline-block; }

/* ============= Proposals for seller ============= */
.req-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px 20px; margin-bottom: 14px; }
.req-summary__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.req-summary__title { font-size: 16px; font-weight: 700; }
.req-summary__id { color: var(--text-muted); font-weight: 500; margin-left: 6px; }
.req-summary__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.req-summary__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; font-size: 12.5px; }
.req-summary__meta .kv__label { font-size: 10.5px; }
.req-summary__meta .kv__value { font-size: 13px; }

.req-status { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 14px 18px; margin-bottom: 14px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.req-status__item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }
.req-status__item b { color: var(--text); font-weight: 700; }
.req-status__sep { width: 1px; height: 22px; background: var(--border); }
.req-status__live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.16); animation: pulse 1.4s infinite; }

.prop-list { display: flex; flex-direction: column; gap: 12px; }
.prop-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; transition: border-color .15s; }
.prop-card.is-best { border-color: rgba(22,101,52,.32); box-shadow: 0 6px 18px rgba(22,101,52,.10); }
.prop-card.is-chosen { border-color: var(--success-fg); box-shadow: 0 6px 18px rgba(22,101,52,.18); }
.prop-card.is-question { border-color: rgba(202,138,4,.32); }
.prop-card.is-rejected { opacity: 0.62; }
.prop-card.is-expired { opacity: 0.55; }
.prop-card__head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.prop-card__avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; letter-spacing: -0.02em; }
.prop-card__avatar--2 { background: linear-gradient(135deg, #10b981, #047857); }
.prop-card__avatar--3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.prop-card__avatar--4 { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.prop-card__name { flex: 1; }
.prop-card__name-t { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prop-card__name-s { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.prop-card__price { text-align: right; }
.prop-card__price-num { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.prop-card__price-sub { font-size: 11.5px; color: var(--text-muted); }
.prop-card__body { padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
@media (max-width: 720px) { .prop-card__body { grid-template-columns: 1fr; } }
.prop-card__col h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.prop-card__list { font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.prop-card__list li { display: flex; gap: 6px; align-items: flex-start; padding: 1px 0; list-style: none; }
.prop-card__list li svg { flex-shrink: 0; margin-top: 4px; }
.prop-card__list li.ok svg { color: var(--success-fg); }
.prop-card__list li.no svg { color: var(--text-muted); }
.prop-card__notes { font-size: 13px; color: var(--text-soft); padding: 10px 12px; background: var(--surface-2); border-radius: 8px; line-height: 1.5; }
.prop-card__quote { padding: 10px 14px; background: #fef3c7; border-left: 3px solid #d97706; border-radius: 0 8px 8px 0; font-size: 13px; color: #78350f; line-height: 1.5; margin: 0 20px 14px; }
.prop-card__foot { padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.prop-card__foot .btn { font-size: 12.5px; padding: 7px 12px; height: 34px; }
.prop-card__foot-state { margin-right: auto; font-size: 12.5px; color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.prop-card .state-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.state-chip--new { background: var(--brand-soft); color: var(--brand); }
.state-chip--ask { background: var(--warn-bg); color: var(--warn-fg); }
.state-chip--open { background: rgba(99,102,241,.14); color: var(--soft-fg); }
.state-chip--won { background: var(--success-bg); color: var(--success-fg); }
.state-chip--lost { background: var(--slate-100); color: var(--text-muted); }
.state-chip--rejected { background: rgba(220,38,38,.12); color: #b91c1c; }
.state-chip--expired { background: var(--slate-100); color: var(--text-muted); }
.state-chip--declined { background: var(--slate-100); color: var(--text-muted); }

.btn--ok { background: #16a34a; color: #fff; }
.btn--ok:hover { background: #15803d; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(22,163,74,.3); }
.btn--reject { color: #b91c1c; border: 1px solid rgba(220,38,38,.3); background: #fff; }
.btn--reject:hover { background: rgba(220,38,38,.08); }

/* contact reveal modal-ish */
.reveal-card { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid rgba(22,101,52,.25); border-radius: 14px; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.reveal-card__icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--success-fg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reveal-card__main { flex: 1; }
.reveal-card__t { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--success-fg); }
.reveal-card__s { font-size: 12.5px; color: #166534; line-height: 1.5; }

/* questions list (Q from FFs to seller) */
.qpanel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px 20px; margin-bottom: 14px; }
.qpanel h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.qpanel__sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.qitem { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
.qitem__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.qitem__who { font-weight: 700; color: var(--text); }
.qitem__q { font-size: 13.5px; color: var(--text); font-weight: 500; margin-bottom: 8px; line-height: 1.45; }
.qitem__answer textarea { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 13px; background: var(--surface); resize: vertical; min-height: 50px; }
.qitem__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.qitem__row .cbx { font-size: 11.5px; padding: 4px 9px; }
.qitem__row .btn { height: 32px; font-size: 12px; padding: 6px 12px; }
.qitem__row__sep { flex: 1; }

/* ============= FF kabinet teaser ============= */
.kab { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 18px; }
.kab__head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; background: var(--surface-2); }
.kab__logo { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.kab__name { font-weight: 700; font-size: 14px; }
.kab__user { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.kab__nav { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 4px; align-items: center; }
.kab__navitem { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.kab__navitem.is-active { background: var(--brand-soft); color: var(--brand); }
.kab__navitem.is-new { color: var(--text); position: relative; }
.kab__navitem.is-new::after { content: ''; position: absolute; top: 6px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.4); animation: ringPulse 2s infinite; }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.kab__navitem__badge { background: #ef4444; color: #fff; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.kab__body { padding: 20px; }
.kab__teaser { background: linear-gradient(135deg, #fff7ed, #fef3c7); border: 1px solid #fde68a; border-radius: 12px; padding: 18px 20px; display: flex; gap: 16px; align-items: center; }
.kab__teaser__icon { width: 48px; height: 48px; border-radius: 12px; background: #d97706; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; }
.kab__teaser__icon::after { content: ''; position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.kab__teaser__main { flex: 1; }
.kab__teaser__t { font-weight: 700; font-size: 16px; color: #78350f; margin-bottom: 2px; }
.kab__teaser__s { font-size: 13px; color: #92400e; line-height: 1.5; }
.kab__teaser__s b { color: #78350f; }
.kab__teaser .btn--primary { background: #d97706; }
.kab__teaser .btn--primary:hover { background: #b45309; }
.kab__list { background: var(--surface-2); border-radius: 10px; padding: 12px; }
.kab__list__row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.kab__list__row + .kab__list__row { border-top: 1px dashed var(--border); }
.kab__list__row__chip { padding: 1px 9px; border-radius: 999px; background: var(--slate-100); color: var(--text-muted); font-size: 11px; font-weight: 600; }
.kab__list__row__sep { flex: 1; color: var(--text-muted); font-size: 12px; }

/* ============= Board for FF ============= */
.board-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.fchip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fchip:hover { border-color: var(--brand); color: var(--brand); }
.fchip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fchip__cnt { background: rgba(255,255,255,.22); padding: 1px 7px; border-radius: 999px; font-size: 11px; }
.fchip:not(.is-on) .fchip__cnt { background: var(--slate-100); color: var(--text-muted); }

.board-filters__more { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; align-items: center; }
.board-filters__more select { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text-soft); }

.board-list { display: flex; flex-direction: column; gap: 12px; }
.bcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); transition: all .15s; }
.bcard:hover { border-color: var(--border-strong); box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.bcard.is-new { border-left: 4px solid var(--brand); }
.bcard.is-urgent { border-left: 4px solid #ef4444; }
.bcard.is-answered { border-left: 4px solid var(--soft-fg); }
.bcard.is-won { border-left: 4px solid var(--success-fg); }
.bcard.is-stale { opacity: .65; }
.bcard__head { padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.bcard__id { font-weight: 700; font-size: 15.5px; }
.bcard__cat { font-size: 12.5px; color: var(--text-muted); }
.bcard__head__sep { flex: 1; }
.bcard__time { font-size: 12px; color: var(--text-muted); }
.bcard__body { padding: 14px 18px; display: grid; grid-template-columns: 1fr 280px; gap: 18px; }
@media (max-width: 900px) { .bcard__body { grid-template-columns: 1fr; } }
.bcard__main { display: flex; flex-direction: column; gap: 10px; }
.bcard__row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-soft); }
.bcard__row svg { color: var(--text-muted); }
.bcard__row span { display: inline-flex; align-items: center; gap: 5px; }
.bcard__row b { color: var(--text); font-weight: 600; }
.bcard__works { display: flex; flex-wrap: wrap; gap: 5px; }
.bcard__works span { padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 11.5px; font-weight: 500; }
.bcard__files { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); }
.bcard__files span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--slate-100); border-radius: 6px; }

.bcard__metrics { background: var(--surface-2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.bcard__metrics__row { display: flex; align-items: center; gap: 6px; color: var(--text-soft); }
.bcard__metrics__row b { color: var(--text); font-weight: 700; }
.bcard__metrics__row .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); }
.bcard__metrics__row .dot--ok { background: var(--success-fg); }
.bcard__metrics__row .dot--ask { background: var(--warn-fg); }

.bcard__foot { padding: 12px 18px; background: var(--surface-2); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-radius: 0 0 14px 14px; }
.bcard__foot__state { font-size: 12.5px; color: var(--text-soft); margin-right: auto; display: flex; align-items: center; gap: 6px; }
.bcard__foot .btn { height: 34px; font-size: 12.5px; padding: 7px 13px; }

/* anonymous banner for FF detail */
.banner--anon { background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #d97706; }
.banner--anon .banner__icon { color: #92400e; }
.banner--anon .banner__text { color: #78350f; }

/* Speed metric */
.speed-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.speed-card h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; }
.speed-card__row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; color: var(--text-soft); }
.speed-card__row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.speed-card__row__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-300); flex-shrink: 0; }
.speed-card__row__dot--me { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.speed-card__hint { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); line-height: 1.5; }

/* Proposal cost form */
.cost-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px 22px; }
.cost-form h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.cost-form__sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; }
.cost-rows { display: flex; flex-direction: column; gap: 4px; }
.cost-row { display: grid; grid-template-columns: 1fr 130px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.cost-row:last-of-type { border-bottom: none; }
.cost-row__name { font-size: 13.5px; font-weight: 500; }
.cost-row__name span { color: var(--text-muted); font-size: 11.5px; font-weight: 400; display: block; margin-top: 1px; }
.cost-row__input { position: relative; }
.cost-row__input input { width: 100%; padding: 7px 26px 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; background: var(--surface); }
.cost-row__input input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cost-row__input::after { content: '₽'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12.5px; }
.cost-row__per { font-size: 12px; color: var(--text-muted); }
.cost-total { display: flex; align-items: center; gap: 14px; padding: 14px 14px; margin-top: 14px; background: var(--brand-soft); border-radius: 10px; }
.cost-total__lbl { font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.cost-total__num { font-size: 26px; font-weight: 800; color: var(--brand); margin-left: auto; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cost-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 600px) { .cost-meta-grid { grid-template-columns: 1fr; } }
.cost-form__cmt { margin-top: 14px; }
.cost-form__actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.cost-form__actions .btn--primary { flex: 1; min-width: 200px; justify-content: center; }

/* After-sent status for FF */
.post-status { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-card); padding: 28px 30px; margin-bottom: 14px; }
.post-status__head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.post-status__icon { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.post-status__icon--wait { background: var(--brand-soft); color: var(--brand); }
.post-status__icon--won { background: var(--success-bg); color: var(--success-fg); }
.post-status__icon--lost { background: var(--slate-100); color: var(--text-muted); }
.post-status__icon--chat { background: rgba(99,102,241,.16); color: var(--soft-fg); }
.post-status__icon--stale { background: var(--warn-bg); color: var(--warn-fg); }
.post-status h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.post-status__sub { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.post-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.post-meta__bx { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.post-meta__lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.post-meta__val { font-size: 14px; font-weight: 600; color: var(--text); }
.post-status__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.archive-banner { background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.archive-banner__icon { width: 32px; height: 32px; border-radius: 8px; background: #fff; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.archive-banner b { color: var(--text); }
.archive-banner__sub { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin: 2px 0 10px; }
.archive-banner__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* alt switcher for proposals */
.proposal-state-tabs { display: inline-flex; gap: 4px; background: var(--slate-100); padding: 4px; border-radius: 10px; margin-bottom: 12px; font-size: 12px; flex-wrap: wrap; }
.proposal-state-tabs button { padding: 6px 12px; border-radius: 7px; font-weight: 600; color: var(--text-muted); font-size: 12.5px; }
.proposal-state-tabs button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* alt FF status state tabs */
.ff-status-tabs { display: flex; gap: 4px; background: var(--slate-100); padding: 4px; border-radius: 10px; margin-bottom: 14px; font-size: 12px; flex-wrap: wrap; }
.ff-status-tabs button { padding: 6px 12px; border-radius: 7px; font-weight: 600; color: var(--text-muted); font-size: 12.5px; }
.ff-status-tabs button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* download card */
.dl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.dl-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.dl-card__sub { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.dl-card__row { display: flex; gap: 8px; flex-wrap: wrap; }

/* misc */
.note { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.divider-text { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-muted); font-size: 12px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }


/* ── Hero CTA-ряд + вход в калькулятор селлера (205) ───────────────────────── */
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; position: relative; z-index: 1; }
.btn--hero-ghost { background: rgba(255, 255, 255, 0.06); color: #fff; border: 1px solid rgba(255, 255, 255, 0.38); }
.btn--hero-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.75); color: #fff; }
.hero__note { margin-top: 10px; font-size: 12.5px; color: rgba(255, 255, 255, 0.75); max-width: 640px; position: relative; z-index: 1; }
@media (max-width: 560px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}
