.app--card-matching .main {
  padding-bottom: 48px;
}

.app--card-matching input {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
}

.field--wide input {
  min-width: 220px;
}

.status-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-grid--card-matching {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.matching-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.matching-panel {
  min-width: 0;
}

.matching-panel--wide {
  grid-column: 1 / -1;
}

.matching-list {
  display: grid;
  gap: 10px;
}

.matching-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.matching-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.matching-item__title {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.matching-item__amount {
  white-space: nowrap;
  color: var(--teal);
  font-weight: 900;
}

.matching-item__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.matching-side {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfb;
  padding: 10px;
}

.matching-side__label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.matching-side__main {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.matching-side__sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.matching-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.matching-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.matching-tag--active {
  background: var(--green-2);
  color: var(--green);
}

.matching-tag--cancelled {
  background: var(--red-2);
  color: var(--red);
}

.matching-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matching-actions .button {
  min-height: 34px;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8fbfb;
  padding: 18px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 900px) {
  .metric-grid--card-matching,
  .matching-item__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .matching-item__head {
    display: grid;
  }

  .matching-item__amount {
    white-space: normal;
  }

  .field--wide input {
    min-width: 0;
  }
}
