/* Top-up modal (customer self top-up, Telegram-approved) */
.topup-scrim {
  position: fixed; inset: 0; background: rgba(4, 6, 10, 0.72);
  z-index: 90; backdrop-filter: blur(2px);
}
.topup-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 28px)); max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--panel, #10161f); border: 1px solid var(--border, #1d2634);
  border-radius: 14px; z-index: 91; box-shadow: 0 18px 60px rgba(0,0,0,.5);
}
.topup-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border, #1d2634);
  position: sticky; top: 0; background: var(--panel, #10161f);
}
.topup-head h2 { font-size: 16px; font-weight: 800; }
.topup-sub { font-size: 11.5px; color: var(--text-dim, #9aa7b8); margin-top: 3px; line-height: 1.5; }
.topup-close {
  background: none; border: none; color: var(--text-dim, #9aa7b8);
  font-size: 22px; cursor: pointer; line-height: 1; padding: 2px 6px;
}
.topup-close:hover { color: var(--text, #e8edf4); }

.topup-body { padding: 14px 16px 18px; }
.topup-qr { text-align: center; margin-bottom: 14px; }
.topup-qr-img {
  width: 210px; height: 210px; margin: 0 auto 6px;
  border: 1px dashed var(--border-2, #26324a); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--surface, #141b26);
}
.topup-qr-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.topup-qr-placeholder { font-size: 12px; color: var(--text-faint, #5c6a7d); line-height: 1.7; text-align: center; padding: 10px; }
.topup-qr-text { font-size: 12px; font-weight: 700; color: var(--text-dim, #9aa7b8); }
.topup-pay-item { font-size: 13px; font-weight: 600; color: var(--text, #e6eaf0); line-height: 1.9; word-break: break-word; }
.topup-pay-list { margin-top: 8px; }
.topup-contact-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.topup-contact {
  display: inline-block; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--gold, #e8b44a); background: rgba(232, 180, 74, 0.12);
  color: var(--gold-bright, #f0c96a); font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.topup-contact:hover { background: rgba(232, 180, 74, 0.22); }
.topup-rate { font-size: 11.5px; color: var(--text-dim, #9aa7b8); }
.topup-rate b { color: var(--gold-bright, #f0c96a); }

.topup-step { margin-bottom: 14px; }
.topup-step h4 { font-size: 12px; font-weight: 800; margin-bottom: 8px; color: var(--gold-bright, #f0c96a); }
.topup-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.topup-amt {
  padding: 9px 0; border-radius: 8px; border: 1px solid var(--border, #1d2634);
  background: var(--surface, #141b26); color: var(--text-dim, #9aa7b8);
  font-weight: 800; font-size: 13px; cursor: pointer;
}
.topup-amt:hover { color: var(--text, #e8edf4); }
.topup-amt.on {
  color: #14100a; background: linear-gradient(180deg, var(--gold-bright, #f0c96a), var(--gold, #d4a843));
  border-color: transparent;
}
.topup-custom { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text-dim, #9aa7b8); }
.topup-custom input {
  flex: 1; background: var(--surface, #141b26); border: 1px solid var(--border, #1d2634);
  border-radius: 8px; padding: 8px 10px; color: var(--text, #e8edf4);
  font-family: var(--mono, monospace); font-size: 13px;
}
.topup-payline { font-size: 12.5px; margin-top: 10px; color: var(--text-dim, #9aa7b8); }
.topup-payline b { color: var(--green, #2fbf71); font-size: 15px; }

.topup-drop {
  display: block; text-align: center; padding: 18px 10px;
  border: 1.5px dashed var(--border-2, #26324a); border-radius: 10px;
  color: var(--text-faint, #5c6a7d); font-size: 12px; cursor: pointer;
  transition: border-color .15s;
}
.topup-drop:hover { border-color: var(--gold, #d4a843); color: var(--text-dim, #9aa7b8); }
.topup-preview {
  display: block; max-width: 100%; max-height: 220px; margin: 10px auto 0;
  border-radius: 10px; border: 1px solid var(--border, #1d2634);
}

.topup-submit {
  width: 100%; padding: 12px 0; border: none; border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-bright, #f0c96a), var(--gold, #d4a843));
  color: #14100a; font-weight: 800; font-size: 14px; cursor: pointer;
}
.topup-submit:disabled { opacity: .5; cursor: wait; }
.topup-note { font-size: 12px; text-align: center; margin-top: 10px; min-height: 16px; color: var(--text-dim, #9aa7b8); }
.topup-note.ok { color: var(--green, #2fbf71); }
.topup-note.err { color: var(--red, #e05252); }

.topup-history { margin-top: 16px; border-top: 1px solid var(--border, #1d2634); padding-top: 12px; }
.topup-history h4 { font-size: 12px; font-weight: 800; margin-bottom: 8px; color: var(--text-dim, #9aa7b8); }
.topup-history-list { font-size: 12px; max-height: 150px; overflow-y: auto; }
.topup-hist-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 2px;
  border-bottom: 1px dashed var(--border, #1d2634);
}
.topup-hist-row:last-child { border-bottom: none; }
.topup-hist-row .amt { font-weight: 800; font-family: var(--mono, monospace); }
.topup-hist-row .credit { font-weight: 800; font-family: var(--mono, monospace); color: var(--green, #2fbf71); }
.topup-hist-row .when { color: var(--text-faint, #5c6a7d); font-size: 10.5px; margin-left: auto; }
.topup-st { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.topup-st.pending { background: rgba(240,201,106,.14); color: var(--gold-bright, #f0c96a); }
.topup-st.approved { background: rgba(47,191,113,.14); color: var(--green, #2fbf71); }
.topup-st.rejected { background: rgba(224,82,82,.14); color: var(--red, #e05252); }
