.tenders { display: grid; gap: 20px; }
.tenders .card { min-width: 0; }
.tenders .tender-toolbar { gap: 12px; flex-wrap: wrap; }
.tenders .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.tenders .filters { margin-bottom: 16px; align-items: end; }
.tenders .filters label:first-child { flex: 1; }
.tenders td { overflow-wrap: anywhere; }
.tenders .card-title { overflow-wrap: anywhere; }
.tenders td.num, .tenders th.num { text-align: right; white-space: nowrap; }
.tenders tfoot th { background: #fafbfc; }
.tenders .pre { white-space: pre-wrap; }
.tender-event { border-bottom: 1px solid var(--border, #dce2ea); padding: 12px 0; overflow-wrap: anywhere; }
.tender-event.decision { border-left: 3px solid var(--primary); padding-left: 12px; }
.tender-event p { margin: 6px 0; }
.tender-change { font-size: 13px; margin-top: 4px; }
.tender-catalog { padding-left: 20px; overflow-wrap: anywhere; }
.tender-catalog li { margin: 8px 0; }

/* Статусы процесса */
.tender-status-found { background: #eef1f5; color: #374151; }
.tender-status-evaluation { background: #fff3cd; color: #8a6100; }
.tender-status-preparation { background: #dbeafe; color: #1e40af; }
.tender-status-approval { background: #e7e3fb; color: #4b2fb4; }
.tender-status-submitted, .tender-status-awaiting { background: #dff4f8; color: #007f97; }
.tender-status-won { background: #dcfce7; color: #166534; }
.tender-status-lost { background: #fee2e2; color: #991b1b; }
.tender-status-cancelled { background: #e5e7eb; color: #374151; }
.tender-status-declined { background: #fde8d8; color: #9a3412; }
.price-approved { background: #dcfce7; color: #166534; }
.price-pending { background: #fff3cd; color: #8a6100; }
.price-rejected { background: #fee2e2; color: #991b1b; }
.price-draft { background: #eef1f5; color: #374151; }
.check-ready, .check-not_required, .lot-won { color: #166534; font-weight: 600; }
.check-in_progress { color: #1e40af; }
.check-pending { color: #8a6100; }
.lot-lost { color: #991b1b; font-weight: 600; }
.tender-overdue { color: var(--danger, #c62828); font-weight: 600; font-size: 12px; }
.tender-soon { color: #b45309; font-weight: 600; font-size: 12px; }
.row-alert td { background: #fff5f5; }
.row-warn td { background: #fffbeb; }

/* Навигация раздела и карточки */
.tender-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tender-subtabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tender-subtabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 500; }
.tender-subtabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tender-head { display: flex; flex-direction: column; gap: 14px; }
.tender-head-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tender-head h3 { font-size: 19px; margin-top: 4px; overflow-wrap: anywhere; }
.tender-stepper { display: flex; list-style: none; margin: 0; padding: 0; counter-reset: step; flex-wrap: wrap; gap: 4px; }
.tender-stepper li { flex: 1; min-width: 110px; padding: 8px 10px; background: #eef1f5; color: var(--muted); font-size: 12px; font-weight: 500;
  border-radius: 6px; position: relative; text-align: center; }
.tender-stepper li.done { background: #e9eef8; color: var(--primary); }
.tender-stepper li.current { background: var(--primary); color: #fff; }
.tender-stepper li.final-won { background: #166534; }
.tender-stepper li.final-lost { background: #991b1b; }
.tender-stepper li.final-cancelled, .tender-stepper li.final-declined { background: #6b7280; }
.tender-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tender-facts > div { background: #fafbfc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-weight: 500; }
.tender-facts span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-bottom: 2px; }
.tender-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tender-actions .btn[disabled] { cursor: help; }
.tender-card dd { overflow-wrap: anywhere; }

/* Подготовка */
.progress { height: 6px; background: #edf0f4; border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; background: var(--success, #2e7d32); }
.tender-package { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.tender-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tender-checks li.ok { color: #166534; }
.tender-checks li.no { color: var(--muted); }
.tender-departments { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; max-height: 220px; overflow-y: auto; }
.form-grid.single { grid-template-columns: 1fr; }

/* Сводка */
.tender-kpi { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tender-kpi .stat-value { font-size: 24px; }
.stat-money { font-size: 15px; display: inline-block; line-height: 1.4; }
.stat.stat-warn { border-left-color: #f5b300; }
.stat.stat-alert { border-left-color: var(--danger, #c62828); }

@media (max-width: 700px) {
  .tender-page .sidebar { flex-direction: column; align-items: stretch; gap: 12px; }
  .tender-page .nav { flex-wrap: wrap; }
  .tender-page .topbar { flex-wrap: wrap; gap: 12px; }
  .tender-page .userbox { flex-wrap: wrap; }
  .tenders .filters { flex-direction: column; align-items: stretch; }
  .tenders .profile-list { grid-template-columns: 1fr; }
  .tenders .profile-list dd { overflow-wrap: anywhere; }
  .tender-head-top { flex-direction: column; }
  .tender-stepper li { min-width: 90px; }
}
