/* Модуль заявок ЛП на ЛП */
.page-needs .needs-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}

.needs-split {
  display: grid;
  gap: 16px;
}

.needs-panel {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  padding: 16px;
  box-shadow: var(--ui-shadow-sm);
}

.needs-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.needs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.needs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.needs-filters input,
.needs-filters select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
}

.needs-table-wrap {
  overflow: auto;
  max-height: 420px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
}

.needs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.needs-table th,
.needs-table td {
  border-bottom: 1px solid var(--ui-border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.needs-table th {
  background: var(--ui-surface-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.needs-row--ok {
  background: #ecfdf5;
}
.needs-row--needs_check {
  background: #fef9c3;
}
.needs-row--error {
  background: #fee2e2;
}
.needs-row--not_selected {
  background: #f3f4f6;
}
.gvs-queue-row {
  cursor: pointer;
}

.gvs-queue-row:hover td {
  background: rgba(37, 99, 235, 0.05);
}

.needs-row--clickable {
  cursor: pointer;
}
.needs-row--clickable:hover td {
  background: rgba(37, 99, 235, 0.06);
}

.needs-row--imported_or_manual {
  background: #dbeafe;
}

.needs-mnn-group {
  margin-bottom: 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  overflow: hidden;
}

.needs-mnn-group summary {
  cursor: pointer;
  padding: 10px 12px;
  background: var(--ui-surface-soft);
  font-weight: 600;
}

.needs-mnn-group .needs-inner-table {
  margin: 0;
}

.needs-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
}

.needs-landing-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.needs-dup-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.needs-dup-modal[hidden] {
  display: none;
}

.needs-dup-modal__box {
  background: var(--ui-surface);
  padding: 20px;
  border-radius: var(--ui-radius-md);
  max-width: 420px;
  box-shadow: var(--ui-shadow-md);
}

.needs-dup-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.needs-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.needs-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 13px;
}

.needs-detail-meta-item {
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  padding: 8px 10px;
}

.needs-detail-meta-item b {
  display: block;
  margin-bottom: 2px;
}

.needs-check {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 14px;
  min-height: 38px;
  line-height: 1;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
}

.needs-check span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 600;
}

.needs-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.needs-check:has(input[type="checkbox"]:checked) {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.needs-check:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.needs-check:has(input[type="checkbox"]:checked):hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}


.needs-upload-grid {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(260px, 340px);
  gap: 8px;
}

.needs-upload-grid input {
  width: 100%;
}

.needs-toolbar--filters {
  row-gap: 10px;
}

.needs-toolbar--filters .primary-btn,
.needs-toolbar--filters .ghost-btn {
  min-height: 36px;
  border-radius: 10px;
}

.needs-toolbar--filters .primary-btn:hover {
  filter: brightness(0.96);
}

.needs-toolbar--filters .ghost-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.needs-toolbar--filters .primary-btn:active,
.needs-toolbar--filters .ghost-btn:active {
  transform: translateY(1px);
}

.needs-toolbar--filters input[type="text"] {
  min-height: 36px;
  border-radius: 10px;
}

.needs-toolbar--filters .needs-check {
  min-height: 38px;
}

@media (max-width: 900px) {
  .needs-upload-grid {
    grid-template-columns: 1fr;
  }
}
