.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.data-toolbar > span {
  color: var(--muted);
  white-space: nowrap;
}

.data-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.data-search input {
  width: min(620px, 100%);
  padding: 11px 13px;
  border: 1px solid #344159;
  border-radius: 8px;
  background: #0c131e;
  color: white;
  outline: none;
}

.data-search select,
.report-controls select {
  padding: 11px 13px;
  border: 1px solid #344159;
  border-radius: 8px;
  background: #0c131e;
  color: white;
}

.data-search input:focus {
  border-color: var(--accent);
}

.button-link-inline {
  display: inline-block;
  text-decoration: none;
}

.business-table {
  max-height: none;
  overflow-x: auto;
}

.business-table td {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.business-table tbody tr:hover {
  background: #162231;
}

.business-table th,
.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.pagination a {
  text-decoration: none;
}

.pagination span {
  color: var(--muted);
}

.report-controls {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1.4fr 1fr 1fr auto;
  gap: 12px;
  padding: 18px;
  align-items: end;
}

.report-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0 30px;
}

.report-metric {
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.report-metric span,
.report-metric p {
  color: var(--muted);
}

.report-metric strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 24px;
}

.report-metric p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.report-section {
  margin-top: 26px;
}

.report-section h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.report-table {
  overflow-x: auto;
}

.report-table td {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}

.proposal-filter {
  padding: 16px;
  margin-bottom: 16px;
}

.proposal-filter form {
  display: grid;
  grid-template-columns: 130px 130px minmax(180px, 240px) minmax(280px, 1fr) 110px auto auto;
  align-items: end;
  gap: 10px;
}

.proposal-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.proposal-filter select,
.proposal-filter input {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #344159;
  border-radius: 8px;
  background: #0c131e;
  color: white;
}

.proposal-row { cursor: pointer; }
.proposal-row.our-participation { background: #173d30; color: #e4fff3; }
.proposal-row.our-participation:hover { background: #1d4a3a; }
.proposal-detail > td { padding: 18px 22px; background: #0d1622; }
.proposal-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.proposal-detail-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.proposal-detail-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.proposal-detail h3 { margin: 18px 0 8px; font-size: 14px; }
.proposal-subtable { width: 100%; }
.proposal-subtable th { position: static; }
.proposal-subtable .selected-company { background: #173d30; }
.detail-missing { margin: 0; color: #d4a3a3; }

@media (max-width: 720px) {
  .data-toolbar,
  .data-search {
    align-items: stretch;
    flex-direction: column;
  }

  .business-table {
    max-height: none;
  }
}

@media (max-width: 1200px) {
  .proposal-filter form { grid-template-columns: repeat(3, 1fr); }
  .report-controls {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}
