.qd-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.qd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.qd-table thead {
  background: var(--green);
  color: #fff;
}

.qd-table th {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
}

.qd-table th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.qd-table th:last-child {
  text-align: right;
  border-radius: 0 var(--radius-lg) 0 0;
}

.qd-table td {
  padding: 12px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.qd-table tbody tr:last-child td {
  border-bottom: none;
}

.qd-table tbody tr:hover {
  background: var(--green-pale);
}

.qd-table td:last-child {
  text-align: right;
  color: var(--red, #c0392b);
  font-weight: 600;
}

.qd-table td:nth-child(2) {
  color: var(--green);
  font-weight: 600;
}

.qd-table td:nth-child(3) {
  font-weight: 700;
  font-family: var(--font-heading);
}

.qd-table-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 10px;
  font-style: italic;
}

@media (max-width: 600px) {
  .qd-table thead {
    display: none;
  }
  .qd-table tbody tr {
    display: block;
    padding: 10px 0;
  }
  .qd-table tbody tr + tr {
    border-top: 1px solid var(--border);
  }
  .qd-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 14px;
    border: none;
  }
  .qd-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
  }
  .qd-table td:last-child,
  .qd-table td:nth-child(2),
  .qd-table td:nth-child(3) {
    text-align: left;
  }
}

.qd-table tbody tr.qd-active {
  background: var(--green-pale);
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.qd-table tbody tr.qd-active td {
  font-weight: 700;
}
