/* ==========================================================================
   INFERNAL — Top-up page ("modern" surface pass)
   Loaded only by topup.html, after styles.css + infernal.css.
   Same graphite palette and single indigo accent as the rest of the site:
   glass cards, one hero balance tile, segmented tabs, real primary CTA.
   ========================================================================== */

html[data-page="topup"] {
  --tp-line: rgba(255, 255, 255, 0.075);
  --tp-line-strong: rgba(255, 255, 255, 0.14);
  --tp-dim: #8d8d97;
  --tp-ink: #e9e9ee;
}

html[data-page="topup"] .topup-main {
  padding: clamp(22px, 3vw, 34px) 0 clamp(56px, 6vw, 92px);
}

/* ---------- Back link ---------- */

html[data-page="topup"] .topup-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px 6px 9px;
  border: 1px solid var(--tp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #9a9aa4;
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

html[data-page="topup"] .topup-back:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* ---------- Hero balance tile ---------- */

html[data-page="topup"] .topup-balance-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 18px;
  margin: 20px 0 22px;
  padding: 22px 24px;
  border: 1px solid var(--tp-line);
  border-radius: 22px;
  background:
    radial-gradient(620px 220px at 6% 0%, rgba(99, 102, 241, 0.17), transparent 72%),
    linear-gradient(180deg, rgba(23, 23, 26, 0.94), rgba(12, 12, 14, 0.97));
  box-shadow:
    0 34px 80px -56px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

html[data-page="topup"] .topup-balance-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -96px;
  right: -72px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.24), transparent 68%);
  pointer-events: none;
}

html[data-page="topup"] .topup-balance-icon {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(99, 102, 241, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.1));
  color: #c7c9ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 32px -22px rgba(99, 102, 241, 0.85);
}

html[data-page="topup"] .topup-balance-icon .icon {
  width: 24px;
  height: 24px;
}

html[data-page="topup"] .topup-balance-body {
  gap: 4px;
}

html[data-page="topup"] .topup-balance-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b8b95;
}

html[data-page="topup"] .topup-balance {
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

html[data-page="topup"] .topup-balance-note {
  margin-top: 2px;
  font-size: 12px;
  color: #7f7f89;
}

/* Decorative wallet card — fills the wide hero without new copy. */
html[data-page="topup"] .topup-balance-art {
  position: relative;
  flex: 0 0 auto;
  width: 176px;
  height: 106px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.012) 46%, rgba(99, 102, 241, 0.17));
  box-shadow:
    0 26px 48px -32px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: rotate(-5deg);
  overflow: hidden;
}

html[data-page="topup"] .topup-balance-art::before {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.42), transparent 70%);
}

html[data-page="topup"] .topup-art-chip {
  width: 26px;
  height: 19px;
  border-radius: 5px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
  opacity: 0.42;
}

html[data-page="topup"] .topup-art-mark {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Segmented tabs ---------- */

html[data-page="topup"] .topup-tabs-bar {
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 0;
}

html[data-page="topup"] .topup-tabs {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--tp-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-page="topup"] .topup-tab {
  height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  color: #8f8f99;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

html[data-page="topup"] .topup-tab .icon {
  width: 15px;
  height: 15px;
  opacity: 0.8;
}

html[data-page="topup"] .topup-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

html[data-page="topup"] .topup-tab.is-active {
  border: 0;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.42), rgba(99, 102, 241, 0.19));
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(99, 102, 241, 0.36),
    0 12px 26px -18px rgba(99, 102, 241, 0.95);
}

html[data-page="topup"] .topup-tab.is-active .icon {
  opacity: 1;
  color: #c7c9ff;
}

html[data-page="topup"] .topup-refresh {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--tp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #a3a3ad;
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

html[data-page="topup"] .topup-refresh:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

html[data-page="topup"] .topup-refresh-count {
  min-width: 20px;
  height: 20px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.22);
  color: #c7c9ff;
  font-size: 10px;
  font-weight: 700;
}

/* ---------- Layout + panels ---------- */

html[data-page="topup"] .topup-layout {
  gap: 20px;
}

html[data-page="topup"] .topup-panel {
  padding: 26px;
  border: 1px solid var(--tp-line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(23, 23, 26, 0.9), rgba(12, 12, 14, 0.96));
  box-shadow:
    0 36px 80px -60px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

html[data-page="topup"] .topup-panel-head {
  margin-bottom: 20px;
  gap: 16px;
}

html[data-page="topup"] .topup-panel-head h1 {
  margin-bottom: 7px;
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

html[data-page="topup"] .topup-panel-head p {
  font-size: 12.5px;
  line-height: 1.7;
  color: #8a8a94;
}

html[data-page="topup"] .topup-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.07);
  color: #9ff0b6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

html[data-page="topup"] .topup-auto::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 9px rgba(74, 222, 128, 0.95);
}

/* ---------- Guide ---------- */

html[data-page="topup"] .topup-guide {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

html[data-page="topup"] .topup-guide h3 {
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: #e2e2e8;
}

html[data-page="topup"] .topup-guide h3 .icon {
  color: #a5b4fc;
  opacity: 1;
}

html[data-page="topup"] .topup-guide ol {
  gap: 12px;
}

html[data-page="topup"] .topup-guide li {
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #b4b4bd;
}

html[data-page="topup"] .topup-guide li::before {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.16);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.32);
  color: #c7c9ff;
  font-size: 10.5px;
  font-weight: 700;
}

/* ---------- Fields ---------- */

html[data-page="topup"] .topup-field {
  margin-bottom: 18px;
}

html[data-page="topup"] .topup-field > label {
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #a8a8b2;
}

html[data-page="topup"] .topup-field input {
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--tp-line);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.34);
  color: #f4f4f7;
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

html[data-page="topup"] .topup-field input::placeholder {
  color: #5a5a63;
}

html[data-page="topup"] .topup-field input:hover {
  border-color: rgba(255, 255, 255, 0.13);
}

html[data-page="topup"] .topup-field input:focus {
  border-color: rgba(99, 102, 241, 0.62);
  background: rgba(0, 0, 0, 0.48);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

html[data-page="topup"] .topup-hint {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #77777f;
}

html[data-page="topup"] .topup-warning {
  border-radius: 12px;
  font-size: 11.5px;
}

/* ---------- Steps + bank card ---------- */

html[data-page="topup"] .topup-step-label {
  gap: 9px;
  margin: 20px 0 12px;
  font-size: 12.5px;
  font-weight: 650;
  color: #d6d6dd;
}

html[data-page="topup"] .topup-step-label span {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(180deg, #6d70f5, #4f52e0);
  color: #ffffff;
  font-size: 10.5px;
  box-shadow: 0 10px 20px -14px rgba(99, 102, 241, 0.95);
}

html[data-page="topup"] .topup-bank-card {
  padding: 16px;
  border: 1px solid var(--tp-line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.046), rgba(255, 255, 255, 0.012));
}

html[data-page="topup"] .topup-bank-logo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: #ffffff;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 14px 26px -18px rgba(0, 0, 0, 0.9);
}

html[data-page="topup"] .topup-bank-info strong {
  font-size: 13.5px;
}

html[data-page="topup"] .topup-bank-account {
  font-size: 15px !important;
  letter-spacing: 0.12em;
  color: #ededf2 !important;
}

html[data-page="topup"] .topup-copy-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--tp-line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4ea;
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease;
}

html[data-page="topup"] .topup-copy-btn:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.11);
}

/* ---------- Slip drop zone ---------- */

html[data-page="topup"] .topup-drop {
  min-height: 180px;
  padding: 26px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(340px 150px at 50% 0%, rgba(99, 102, 241, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.014);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

html[data-page="topup"] .topup-drop:hover,
html[data-page="topup"] .topup-drop.is-drag {
  border-color: rgba(99, 102, 241, 0.55);
  background:
    radial-gradient(340px 160px at 50% 0%, rgba(99, 102, 241, 0.16), transparent 72%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 0 0 1px rgba(99, 102, 241, 0.16),
    0 22px 44px -32px rgba(99, 102, 241, 0.8);
}

html[data-page="topup"] .topup-drop.has-file {
  border-style: solid;
  border-color: rgba(74, 222, 128, 0.4);
}

html[data-page="topup"] .topup-drop-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.14);
  color: #c7c9ff;
}

html[data-page="topup"] .topup-drop-icon .icon {
  width: 22px;
  height: 22px;
}

html[data-page="topup"] .topup-drop-title {
  font-size: 13.5px;
  font-weight: 650;
}

html[data-page="topup"] .topup-drop-text {
  margin-top: 2px;
  font-size: 11.5px;
  color: #8a8a94;
}

html[data-page="topup"] .topup-drop-note {
  margin-top: 6px;
  font-size: 10.5px;
  color: #6c6c75;
}

/* ---------- Primary CTA ---------- */

html[data-page="topup"] .topup-submit {
  height: 48px;
  margin-top: 20px;
  border: 1px solid rgba(129, 132, 255, 0.5);
  border-radius: 13px;
  background: linear-gradient(180deg, #6f72f6 0%, #5053e2 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.005em;
  box-shadow:
    0 20px 40px -26px rgba(99, 102, 241, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

html[data-page="topup"] .topup-submit:hover {
  background: linear-gradient(180deg, #7c7ff8 0%, #5b5ee9 100%);
  transform: translateY(-1px);
  box-shadow:
    0 26px 46px -26px rgba(99, 102, 241, 1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

html[data-page="topup"] .topup-submit:active {
  transform: translateY(0) scale(0.997);
}

html[data-page="topup"] .topup-submit:disabled {
  filter: grayscale(0.35);
  opacity: 0.55;
}

html[data-page="topup"] .topup-submit .icon {
  opacity: 0.9;
}

html[data-page="topup"] .topup-status {
  margin-top: 13px;
  font-size: 12px;
}

/* ---------- History ---------- */

html[data-page="topup"] .topup-history {
  gap: 10px;
}

html[data-page="topup"] .topup-history-empty {
  padding: 36px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.014);
  color: #7f7f89;
  font-size: 12px;
  text-align: center;
}

html[data-page="topup"] .topup-history-item {
  padding: 14px 16px;
  border: 1px solid var(--tp-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  transition: background 0.18s ease, border-color 0.18s ease;
}

html[data-page="topup"] .topup-history-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.042);
}

/* ---------- Side cards ---------- */

html[data-page="topup"] .topup-aside {
  gap: 16px;
}

html[data-page="topup"] .topup-side-card {
  padding: 20px;
  border: 1px solid var(--tp-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(23, 23, 26, 0.88), rgba(12, 12, 14, 0.95));
  box-shadow:
    0 30px 70px -58px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

html[data-page="topup"] .topup-side-card h3 {
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: #e6e6ec;
}

html[data-page="topup"] .topup-side-card h3 .icon {
  color: #a5b4fc;
  opacity: 1;
}

html[data-page="topup"] .topup-side-card ul {
  gap: 10px;
}

html[data-page="topup"] .topup-side-card li {
  padding-left: 18px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #a0a0aa;
}

html[data-page="topup"] .topup-side-card li::before {
  top: 7px;
  width: 6px;
  height: 6px;
  background: linear-gradient(180deg, #a5b4fc, #6366f1);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
}

html[data-page="topup"] .topup-side-history {
  gap: 6px;
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(99, 102, 241, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(23, 23, 26, 0.9), rgba(12, 12, 14, 0.96));
}

html[data-page="topup"] .topup-side-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.14);
  color: #c7c9ff;
}

html[data-page="topup"] .topup-side-history strong {
  font-size: 13.5px;
  font-weight: 650;
}

html[data-page="topup"] .topup-side-history p {
  margin-bottom: 10px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8a8a94;
}

html[data-page="topup"] .topup-side-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

html[data-page="topup"] .topup-side-btn:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  html[data-page="topup"] .topup-layout,
  html[data-page="topup"] .topup-layout.is-history {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-page="topup"] .topup-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  html[data-page="topup"] .topup-tabs-bar {
    flex-wrap: nowrap;
    gap: 10px;
  }

  html[data-page="topup"] .topup-tabs {
    order: 0;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    border-bottom: 0;
  }

  html[data-page="topup"] .topup-refresh {
    order: 0;
    flex: 0 0 auto;
    margin-left: 0;
    gap: 5px;
    padding: 0 9px;
  }

  html[data-page="topup"] .topup-refresh > span:not(.topup-refresh-count) {
    display: none;
  }

  html[data-page="topup"] .topup-tab {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12px;
    font-size: 11.5px;
  }

  html[data-page="topup"] .topup-panel {
    padding: 20px;
    border-radius: 20px;
  }

  html[data-page="topup"] .topup-balance-art {
    display: none;
  }
}

@media (max-width: 560px) {
  html[data-page="topup"] .topup-main {
    padding: 16px 0 64px;
  }

  html[data-page="topup"] .topup-balance-card {
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
  }

  html[data-page="topup"] .topup-balance-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  html[data-page="topup"] .topup-balance {
    font-size: 30px;
  }

  html[data-page="topup"] .topup-panel {
    padding: 16px;
    border-radius: 18px;
  }

  html[data-page="topup"] .topup-copy-btn {
    margin-left: 0;
  }

  html[data-page="topup"] .topup-guide {
    padding: 14px;
  }
}
