.loading-copy,
.settings-loading {
  color: var(--muted);
  font-size: 11px;
  padding: 24px 0;
}

.pager {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.pager button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  font: 10px var(--mono);
}

.pager button.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pager span {
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-model-tools {
  display: grid;
  grid-template-columns: 1fr 210px 150px;
  gap: 10px;
  align-items: end;
  margin-bottom: 17px;
}

.dashboard-model-tools .model-filter {
  margin: 0;
}

.dashboard-model-tools label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-model-tools label span,
.field-label > span,
.quick-create label span,
.system-field span {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-model-tools select,
.admin-toolbar select {
  height: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0 9px;
  font-size: 10px;
}

.topup-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 12px;
  align-items: start;
}

.topup-main {
  padding: 25px;
}

.admin-section-head h2,
.redeem-panel h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.admin-section-head p,
.redeem-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.amount-options,
.payment-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.amount-option,
.payment-method {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
}

.amount-option b {
  font: 600 16px var(--mono);
}

.amount-option small,
.payment-method small {
  color: var(--muted);
  font-size: 9px;
}

.amount-option.active,
.payment-method.active {
  border-color: var(--accent, #cc785c);
  box-shadow: inset 0 0 0 1px var(--accent, #cc785c);
  background: #f3e7df;
}

.money-input {
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  margin-top: 7px;
}

.money-input i {
  text-align: center;
  font-style: normal;
}

.money-input input,
.redeem-panel input,
.quick-create input,
.system-field input,
.system-field textarea {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
}

.money-input input {
  height: 100%;
}

.payment-title {
  margin-top: 28px;
}

.topup-summary {
  position: sticky;
  top: 25px;
  min-height: 310px;
  padding: 26px;
  border-radius: 6px;
  background: #363b36;
  color: #fff;
}

.topup-summary > span {
  color: #aeb8af;
  font-size: 10px;
}

.topup-summary > strong {
  display: block;
  margin: 20px 0 25px;
  font: 600 32px var(--mono);
}

.topup-summary dl {
  margin: 0 0 25px;
}

.topup-summary dl div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #50564f;
  font-size: 10px;
}

.topup-summary dt {
  color: #aeb8af;
}

.topup-summary small {
  display: block;
  color: #aeb8af;
  font-size: 9px;
  margin-top: 12px;
}

.topup-summary .button {
  width: 100%;
}

.redeem-panel {
  margin-top: 12px;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.redeem-panel form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.redeem-panel input {
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
}

.admin-panel {
  padding: 20px;
}

.admin-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-toolbar label {
  width: min(330px, 100%);
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.admin-toolbar label svg {
  width: 15px;
}

.admin-toolbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.admin-toolbar > span {
  color: var(--muted);
  font: 10px var(--mono);
}

.admin-table {
  margin-top: 12px;
  overflow-x: auto;
}

.admin-row {
  min-width: 820px;
  min-height: 55px;
  display: grid;
  grid-template-columns: var(--admin-columns);
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  font: 10px var(--mono);
}

.admin-row.header {
  min-height: 38px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
}

.admin-row strong {
  font-family: var(--sans);
  font-size: 11px;
}

.admin-row .row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.row-actions button {
  height: 29px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 9px;
}

.quick-create {
  padding: 17px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 150px 170px auto;
  gap: 10px;
  align-items: end;
}

.quick-create[hidden] {
  display: none;
}

.quick-create label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-create input {
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
}

.system-form {
  padding: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.system-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.system-field input,
.system-field textarea {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.system-field textarea {
  min-height: 95px;
  resize: vertical;
}

.system-form .form-actions,
.system-form .settings-loading {
  grid-column: 1 / -1;
}

.key-row {
  grid-template-columns: 1fr 0.8fr 1.35fr 0.7fr 0.7fr 0.6fr;
}

#channel-modal {
  width: min(680px, calc(100% - 30px));
}

#channel-form {
  padding: 24px;
}

.channel-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

.channel-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.channel-form-grid label.full {
  grid-column: 1 / -1;
}

.channel-form-grid label > span {
  font-size: 10px;
  font-weight: 700;
}

.channel-form-grid input,
.channel-form-grid select,
.channel-form-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 9px 11px;
  outline: 0;
}

.channel-form-grid textarea {
  min-height: 72px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 10px;
}

#channel-form .modal-actions {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .dashboard-model-tools,
  .topup-layout {
    grid-template-columns: 1fr;
  }

  .topup-summary {
    position: static;
  }

  .amount-options,
  .payment-methods {
    grid-template-columns: 1fr 1fr;
  }

  .quick-create,
  .system-form,
  .channel-form-grid {
    grid-template-columns: 1fr;
  }

  .channel-form-grid label.full {
    grid-column: 1;
  }

  .system-form .form-actions {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .amount-options,
  .payment-methods {
    grid-template-columns: 1fr;
  }

  .redeem-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .redeem-panel form {
    grid-template-columns: 1fr;
  }
}
