.portal-nav {
  position: relative;
}

.portal-menu-toggle {
  display: none;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  color: #e9effb;
  padding: 8px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.license-key-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.license-key-block .license-key {
  min-width: 0;
  overflow: visible;
  color: #9ac0ff;
  font: 700 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: normal;
}

.copy-key {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid #2d4975;
  border-radius: 9px;
  background: rgba(57, 125, 255, .09);
  color: #a9c8ff;
  padding: 6px 9px;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.copy-key:hover,
.copy-key:focus-visible,
.portal-menu-toggle:focus-visible {
  border-color: #5d95ff;
  color: #fff;
  outline: 2px solid rgba(81, 215, 255, .35);
  outline-offset: 2px;
}

.topup-pix-layout {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 18px;
}

.topup-qr {
  width: 100%;
  aspect-ratio: 1;
  border: 10px solid #fff;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

#topup-result textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 1px solid var(--portal-line);
  border-radius: 11px;
  background: #080d16;
  color: #d8e7ff;
  padding: 13px;
}

#pending-payment textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 1px solid var(--portal-line);
  border-radius: 11px;
  background: #080d16;
  color: #d8e7ff;
  padding: 13px;
}

.pending-payment-card { max-width: 900px; margin-inline: auto; padding: 28px; }
.pending-payment-card > p { color: var(--portal-muted); }
.payment-finished { display: grid; justify-items: start; gap: 13px; }
.payment-finished > span { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: rgba(69,221,160,.14); color: var(--portal-green); font-size: 26px; }
.payment-finished h2,.payment-finished p { margin: 0; }
.payment-finished p { color: var(--portal-muted); }
.payment-finished code { max-width: 100%; padding: 12px 14px; border: 1px solid var(--portal-line); border-radius: 10px; background: #080d16; color: #9ac0ff; overflow-wrap: anywhere; }

#topup-status {
  color: var(--portal-muted);
  font-size: 13px;
}

@media (max-width: 850px) {
  .portal-menu-toggle { display: inline-flex; margin-left: auto; }

  .portal-nav nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--portal-line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: rgba(7, 10, 17, .98);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  }

  .portal-nav nav.open { display: flex; }
  .portal-nav nav > a:not(.portal-nav-cta) { display: inline-flex; }
  .portal-nav nav > a,
  .portal-nav nav form,
  .portal-nav nav form button { width: 100%; }
  .portal-nav nav form button { justify-content: flex-start; }
  .license-key-block { align-items: stretch; flex-direction: column; }
  .copy-key { align-self: flex-start; }
}

@media (max-width: 560px) {
  .topup-pix-layout { grid-template-columns: 1fr; }
  .topup-qr { width: min(100%, 260px); justify-self: center; }
}
