.fees-dialog {
  width: min(760px, calc(100% - 24px));
}

.fees-dialog-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.fees-dialog-body h3 {
  font-size: 1rem;
}

.fees-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fees-steps li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.fees-steps [aria-current] {
  border-color: #ff795b80;
  background: #ff795b26;
  color: #ffb4a2;
}

.fees-help {
  color: var(--muted);
  font-size: 0.88rem;
}

.fees-period {
  color: #edf3f7;
  font-weight: 680;
}

.fees-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fees-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #d1dce5;
  font-size: 0.85rem;
  font-weight: 650;
}

.fees-field input,
.fees-field select {
  min-width: 0;
  width: 100%;
}

.fees-amounts {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fees-amounts legend {
  padding: 0 4px;
  color: #d1dce5;
  font-size: 0.85rem;
}

.fees-amounts .fees-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fees-table-wrap {
  max-height: 40dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fees-table th,
.fees-table td {
  padding: 8px;
  text-align: center;
}

.fees-table th:first-child {
  min-width: 132px;
  text-align: left;
}

.fees-table thead th {
  position: sticky;
  top: 0;
  background: #19242d;
}

.fees-table input {
  width: 16px;
  height: 16px;
  accent-color: var(--ember);
}

.fees-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.fees-totals div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fees-totals dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.fees-totals dd {
  margin: 0;
  color: #edf3f7;
  font-weight: 750;
}

@media (max-width: 560px) {
  .fees-fields,
  .fees-amounts .fees-fields {
    grid-template-columns: 1fr;
  }
}
