/* Existing SMMESE cabinet tokens; this asset adds only top-up UI and balance access. */
.portal-stage2__balance-topup {
  display: inline-flex; flex: 0 0 auto; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center; gap: 7px; margin-left: 5px;
  border-radius: 50%; color: #fff !important; background: var(--portal-primary);
  font-weight: 700; transition: background-color .18s ease;
}
.portal-stage2__balance-topup:hover { background: var(--portal-primary-hover); }
.portal-stage2__balance-plus { font-size: 26px; font-weight: 400; line-height: 1; }
.portal-stage2__balance-topup-text { display: none; }
.topup-page { max-width: 1120px; }
.topup-page .account-heading { margin-bottom: 26px; }
.topup-back { display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  margin: -9px 0 12px; color: var(--portal-primary) !important; font-size: 14px; }
.topup-back svg { width: 17px; height: 17px; transform: rotate(180deg); }
.topup-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
  align-items: start; gap: 24px; }
.topup-card { padding: 26px; }
.topup-section-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 19px; }
.topup-step { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center;
  border-radius: 10px; background: var(--portal-primary-soft); color: var(--portal-primary); font-weight: 750; }
.topup-page h2, .topup-methods legend { margin: 0; font-size: 20px; font-weight: 760;
  letter-spacing: -.02em; line-height: 1.3; }
.topup-page .account-field { gap: 8px; }
.topup-amount-wrap { position: relative; }
.topup-amount-wrap input { width: 100%; min-height: 54px; padding: 12px 48px 12px 16px;
  border: 1px solid var(--portal-border-strong); border-radius: var(--portal-control-radius);
  background: var(--portal-surface); color: var(--portal-text); font-size: 19px; font-weight: 650; }
.topup-amount-wrap input[aria-invalid="true"] { border-color: var(--portal-danger); }
.topup-amount-currency { position: absolute; top: 50%; right: 17px;
  transform: translateY(-50%); color: var(--portal-text-secondary); pointer-events: none; }
.topup-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.topup-presets button { min-width: 0; min-height: 44px; padding: 6px 4px;
  border: 1px solid var(--portal-border); border-radius: 9px; background: var(--portal-surface);
  color: var(--portal-text-secondary); font-size: 13px; font-weight: 650; cursor: pointer; }
.topup-presets button:hover, .topup-presets button[aria-pressed="true"] {
  color: var(--portal-primary); border-color: var(--portal-primary); background: var(--portal-primary-soft); }
.topup-presets button:disabled { opacity: .5; cursor: default; }
.topup-hint { margin: 10px 0 0; color: var(--portal-text-secondary); font-size: 13px; line-height: 1.5; }
.topup-error { color: var(--portal-danger); }
.topup-methods { min-width: 0; margin: 25px 0 0; padding: 0; border: 0; }
.topup-methods legend { width: 100%; margin-bottom: 17px; }
.topup-methods legend .topup-section-heading { margin: 0; }
.topup-provider { position: relative; display: block; margin-top: 10px; }
.topup-provider:first-of-type { margin-top: 0; }
.topup-provider input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.topup-provider-card { display: flex; min-height: 81px; align-items: center; gap: 13px; padding: 15px;
  border: 1px solid var(--portal-border); border-radius: var(--portal-control-radius);
  background: var(--portal-surface); cursor: pointer; }
.topup-provider input:checked + .topup-provider-card { border-color: var(--portal-primary); background: var(--portal-primary-soft); }
.topup-provider input:focus-visible + .topup-provider-card { outline: 3px solid var(--portal-focus); outline-offset: 3px; }
.topup-provider input:disabled + .topup-provider-card { cursor: default; opacity: .65; }
.topup-provider-mark { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center;
  border-radius: 11px; color: var(--portal-primary); background: #fff; border: 1px solid var(--portal-border); }
.topup-provider-mark svg { width: 22px; height: 22px; }
.topup-provider-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.topup-provider-copy strong { font-size: 16px; font-weight: 720; }
.topup-provider-copy small { color: var(--portal-text-secondary); font-size: 13px; line-height: 1.4; }
.topup-radio-mark { flex: 0 0 19px; width: 19px; height: 19px; border: 1px solid var(--portal-border-strong); border-radius: 50%; }
.topup-provider input:checked + .topup-provider-card .topup-radio-mark { border: 5px solid var(--portal-primary); background: #fff; }
.topup-platega-method { margin-top: 14px; }
.topup-platega-method select { width: 100%; min-height: 46px; padding: 10px 13px;
  border: 1px solid var(--portal-border-strong); border-radius: var(--portal-control-radius);
  font: inherit; color: var(--portal-text); background: var(--portal-surface); }
.topup-summary-card { background: linear-gradient(145deg, #fff, #f7faff); }
.topup-summary-card h2 { margin-bottom: 22px; }
.topup-conversion { padding: 20px; border: 1px solid #d7e5fb; border-radius: 12px; background: var(--portal-primary-soft); }
.topup-conversion-line { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: center; gap: 10px; }
.topup-conversion-line > div { min-width: 0; }
.topup-conversion-line small { display: block; color: var(--portal-text-secondary); font-size: 12px; }
.topup-conversion-line strong { display: block; margin-top: 6px; font-size: 25px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.topup-conversion-line .topup-credit { color: var(--portal-primary); }
.topup-conversion-arrow { color: var(--portal-text-secondary); font-size: 23px; text-align: center; }
.topup-rate { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #d7e5fb;
  color: var(--portal-text-secondary); font-size: 13px; }
.topup-display-note { margin: 15px 0 21px; color: var(--portal-text-secondary); font-size: 13px; line-height: 1.55; }
.topup-submit.account-button { width: 100%; min-height: 52px; justify-content: center; gap: 9px; font-size: 15px; }
.topup-submit svg { width: 19px; height: 19px; }
.topup-submit:disabled { cursor: not-allowed; opacity: .55; }
.topup-new.account-button { margin-top: 12px; width: 100%; }
.topup-notice { margin: 15px 0 0; padding: 12px 14px; border: 1px solid var(--portal-border);
  border-radius: 10px; background: var(--portal-surface-soft); font-size: 13px; overflow-wrap: anywhere; }
.topup-notice:empty { display: none; }
.topup-history-card { margin-top: 24px; }
.topup-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.topup-history-heading .account-button { min-height: 44px; padding: 8px 13px; }
.topup-history-list { margin: 0; padding: 0; list-style: none; }
.topup-history-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-top: 1px solid var(--portal-border); }
.topup-history-copy { display: grid; min-width: 0; gap: 4px; overflow-wrap: anywhere; }
.topup-history-copy span { color: var(--portal-text-secondary); font-size: 13px; }
.topup-history-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topup-history-actions .account-button { min-height: 44px; padding: 8px 12px; font-size: 13px; }
.topup-page select, .topup-page input, .topup-page button { font-family: inherit; }
.topup-noscript { padding: 14px; border: 1px solid var(--portal-border); border-radius: 11px; }
@media (max-width: 1200px) and (min-width: 1100px) {
  .topup-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
  .topup-card { padding: 22px; }
}
@media (max-width: 820px) { .topup-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (max-width: 640px) {
  /* One balance DOM node, always outside the drawer; no duplicated wallet state. */
  .portal-stage2__topbar { height: auto; }
  .portal-stage2__topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 8px; padding: 10px 16px 12px; }
  .portal-stage2__topbar-tools { display: contents; }
  .portal-stage2__brand { grid-column: 1; grid-row: 1; }
  .portal-stage2__profile { grid-column: 2; grid-row: 1; }
  .portal-stage2__topbar-tools > .portal-language-switcher { grid-column: 3; grid-row: 1; }
  .portal-stage2__drawer-trigger { grid-column: 4; grid-row: 1; }
  .portal-stage2__balance { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 58px;
    gap: 10px; padding: 6px 9px 6px 12px; border-radius: 12px; }
  .portal-stage2__balance-copy { flex: 1; }
  .portal-stage2__balance-label { display: block; font-size: 12px; }
  .portal-stage2__balance strong { max-width: none; overflow: visible; white-space: normal;
    overflow-wrap: anywhere; font-size: 16px; }
  .portal-stage2__balance-topup { min-height: 44px; padding: 0 12px; border-radius: 9px; font-size: 13px; margin: 0; }
  .portal-stage2__balance-plus { font-size: 24px; }
  .portal-stage2__balance-topup-text { display: inline; }
  .portal-stage2__layout { min-height: calc(100dvh - 132px); }
  .portal-stage2__main { padding-top: 24px; scroll-margin-top: 144px; }
  .portal-stage2__profile-menu { top: 58px; }
  .topup-back { margin-bottom: 8px; min-height: 32px; }
  .topup-page .account-heading { margin-bottom: 20px; }
  .topup-page .account-heading h1 { font-size: 30px; }
  .topup-page .account-heading p:not(.account-eyebrow) { margin-top: 10px; font-size: 14px; }
  .topup-card { padding: 18px; }
  .topup-page h2, .topup-methods legend { font-size: 18px; }
  .topup-section-heading { gap: 9px; margin-bottom: 15px; }
  .topup-methods { margin-top: 20px; }
  .topup-provider-card { min-height: 74px; padding: 12px; gap: 10px; }
  .topup-presets { gap: 6px; }
  .topup-presets button { font-size: 12px; }
  .topup-summary-card h2 { margin-bottom: 16px; }
  .topup-conversion { padding: 16px; }
  .topup-conversion-line { gap: 6px; }
  .topup-conversion-line strong { font-size: 23px; }
  .topup-history-card { margin-top: 18px; }
  .topup-history-heading { align-items: flex-start; }
  .topup-history-heading h2 { padding-top: 9px; }
  .topup-history-item { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 360px) {
  .portal-stage2__topbar-inner { padding-right: 12px; padding-left: 12px; }
  .portal-stage2__balance { gap: 7px; }
  .portal-stage2__balance-topup { padding: 0 9px; }
  .topup-card { padding: 15px; }
  .topup-page .account-heading h1 { font-size: 28px; }
  .topup-conversion-line strong { font-size: 21px; }
}
