/* Заявки на закупку: свой файл, потому что раздел можно выключить.
   Общую app.css не трогаем — её правят все модули сразу. */

/* ---------- Список ---------- */

.req-table td { vertical-align: top; }

.req-row__product {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Состояния ---------- */

.req-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.req-chip--new {
  background: var(--accent-soft);
  border-color: #c3d6fd;
  color: var(--accent-dark);
}

.req-chip--work {
  background: var(--warn-soft);
  border-color: #f0d5a8;
  color: var(--warn);
}

.req-chip--closed {
  background: var(--ok-soft);
  border-color: #b7e3cf;
  color: var(--ok);
}

/* ---------- Карточка ---------- */

.req-quantity {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 16px;
  font-weight: 500;
}

.req-text {
  font-size: 14px;
  line-height: 1.55;
}

.req-text p { margin: 0 0 8px; }
.req-text--tight { margin-top: 12px; }

/* Связь с закупкой: ссылка после того, как документ завели, или кнопка. */
.req-purchase {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.req-purchase .btn { align-self: flex-start; }
.req-purchase__link { font-weight: 500; }

/* Пояснение под единственной строкой закупки: там, где таблица кончается. */
.req-defaults { padding: 10px 14px 14px; }
.req-defaults p:last-child { margin-bottom: 0; }

.req-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.req-links > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.req-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px;
}

.req-meta > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.req-meta__label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Действия ---------- */

.req-actions form { margin: 0 0 10px; }
.req-actions .btn { width: 100%; }
.req-actions p:last-child { margin-bottom: 0; }
