/*
 * Loan reduction (loan-reduction.js): the "Loan amount" card on a loan application's
 * page for staff, and the revised line under the amount on the member's requests.
 * Every selector is .lred*, used nowhere else.
 */
.lred {
  margin-top: .75rem;
  padding: .75rem .85rem .8rem;
  border: 1px solid rgba(26, 45, 90, .14);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcff, #fff);
}

.lred__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.lred__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #14306b;
}

.lred__amounts {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.lred__amount {
  display: grid;
  gap: .1rem;
  padding: .35rem .65rem;
  border-radius: 9px;
  background: #f4f6fb;
}

.lred__amount--revised {
  background: #fff4e5;
  border: 1px solid #f5c98a;
}

.lred__amount-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #64748b;
}

.lred__amount strong {
  font-size: 15px;
  color: #0f1f44;
}

.lred__note {
  margin: .5rem 0 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}

.lred__who {
  color: #64748b;
  font-size: 11.5px;
}

.lred__hint {
  margin: .5rem 0 0;
  padding: .45rem .6rem;
  border-left: 3px solid #2f6fbf;
  border-radius: 6px;
  background: rgba(47, 111, 191, .06);
  font-size: 12px;
  color: #1e3a5f;
  line-height: 1.5;
}

.lred__subtitle {
  margin: .6rem 0 .3rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.lred__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .5rem;
  font-size: 12.5px;
}

.lred__table th,
.lred__table td {
  padding: .3rem .5rem;
  border-bottom: 1px solid #edf1f7;
  text-align: right;
  white-space: nowrap;
}

.lred__table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}

.lred__table .lred__label {
  text-align: left;
  color: #475569;
}

.lred__revised.is-changed {
  font-weight: 700;
  color: #b45309;
}

.lred__form {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px dashed #dbe3f2;
}

.lred__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem .8rem;
}

.lred__field {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.lred__field-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.lred__field-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.lred .lred__input {
  width: 100%;
  min-width: 0;
  padding: .45rem .6rem;
  border: 1px solid #d8e1f0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

.lred__preview:empty {
  display: none;
}

.lred__message {
  margin: .4rem 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #b02a2a;
}

.lred__message:empty {
  display: none;
}

.lred__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .6rem;
}

.lred__history {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
}

.lred__history li {
  margin: .15rem 0;
}

.lred__history .lred__who {
  display: block;
}

.lred__member {
  margin-top: .2rem;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  white-space: normal;
}

@media (max-width: 640px) {
  .lred__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lred__table th,
  .lred__table td {
    padding: .25rem .35rem;
    font-size: 12px;
  }
}
