:root {
  --void: #182544;
  --deep: #1d2a49;
  --panel: #263458;
  --panel-header: #223052;
  --panel-2: #324167;
  --panel-3: #3b4a71;

  --line-soft: #43537d;
  --line: #566896;
  --line-hv: #7a8ec2;

  --ink: #f4f7fc;
  --ink-2: #d5dfef;
  --ink-3: #bccade;

  --fire: #fb923c;
  --fire-lit: #fdba74;
  --sun: #facc15;
  --fire-ink: #2a1004;
  --gold: #f0b60a;

  --ok: #34d88a;
  --aura: #3fd0ec;
  --bad: #ff9aa6;

  --r1: 6px;
  --r2: 10px;
  --r3: 14px;

  --e1: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 10px 24px -16px rgba(3, 7, 18, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Quicksand", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--void);
  background-image:
    radial-gradient(900px 440px at 10% 0%, rgba(27, 92, 255, 0.2), transparent 72%),
    radial-gradient(760px 400px at 94% 0%, rgba(251, 146, 60, 0.12), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--ink);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.is-hidden {
  display: none !important;
}

/* Page Container */
.topup-page {
  padding: 28px 20px 56px;
}

.topup-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  text-decoration: none;
}

.header-btn--ghost {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

.header-btn--ghost:hover {
  background: var(--panel-2);
  border-color: var(--line-hv);
}

.header-btn--primary {
  background: linear-gradient(96deg, var(--fire), var(--sun));
  color: var(--fire-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.header-btn--primary:hover {
  filter: brightness(1.05);
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  box-shadow: var(--e1);
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.user-balance {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.user-logout-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: all 0.15s ease;
}

.user-logout-btn:hover {
  color: var(--bad);
  border-color: rgba(255, 154, 166, 0.45);
}

.page-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.18), rgba(250, 204, 21, 0.08));
  border: 1px solid rgba(251, 146, 60, 0.36);
  display: grid;
  place-items: center;
  color: var(--sun);
  flex-shrink: 0;
  box-shadow: 0 4px 16px -6px rgba(251, 146, 60, 0.35);
}

.page-icon svg {
  width: 20px;
  height: 20px;
}

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.breadcrumb-link {
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: var(--ink);
}

.breadcrumb-sep {
  display: inline-flex;
  color: #7c8fb8;
}

.breadcrumb-sep svg {
  width: 12px;
  height: 12px;
}

.breadcrumb-current {
  color: var(--gold);
  font-weight: 600;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Main 2-Column Asymmetric Grid */
.topup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 375px;
  gap: 16px;
  align-items: start;
}

/* Shared Panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r3);
  box-shadow: var(--e1);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  background: var(--panel-header);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.mini-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mini-badge svg {
  width: 13px;
  height: 13px;
}

.mini-badge--amber {
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--sun);
}

.mini-badge--slate {
  background: rgba(188, 202, 222, 0.1);
  border: 1px solid rgba(188, 202, 222, 0.22);
  color: var(--ink-2);
}

.status-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 216, 138, 0.2);
}

.panel-body {
  padding: 16px;
}

/* Mode Switcher */
.mode-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  padding: 11px 13px;
  border-radius: var(--r2);
  background: var(--panel-2);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mode-card:hover {
  border-color: var(--line-hv);
}

.mode-card.is-active {
  border-color: var(--fire);
  background: rgba(251, 146, 60, 0.12);
}

.mode-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.mode-card-desc {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  line-height: 1.35;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.25;
}

.label-muted {
  color: var(--ink-3);
  font-weight: 500;
}

.required {
  color: var(--bad);
  font-weight: 700;
}

/* Custom Select */
.custom-select {
  position: relative;
}

.select-trigger {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-trigger:hover {
  border-color: var(--line-hv);
}

.custom-select.is-open .select-trigger,
.select-trigger:focus-visible {
  outline: none;
  border-color: var(--fire);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
}

.select-trigger.is-placeholder .select-value {
  color: var(--ink-3);
  font-weight: 400;
}

.select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-chevron {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.custom-select.is-open .select-chevron {
  transform: rotate(180deg);
  color: var(--fire-lit);
}

.select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 40;
  list-style: none;
  background: #223052;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 14px 32px rgba(4, 9, 24, 0.65);
  display: none;
}

.custom-select.is-open .select-menu {
  display: block;
}

.select-option {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.select-option:hover,
.select-option:focus-visible {
  outline: none;
  background: var(--panel-3);
  color: var(--ink);
}

.select-option.is-selected {
  background: rgba(251, 146, 60, 0.16);
  color: var(--fire-lit);
  font-weight: 700;
}

.select-option-sub {
  font-size: 11.5px;
  color: var(--ok);
  font-weight: 700;
}

.select-menu::-webkit-scrollbar {
  width: 6px;
}

.select-menu::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

/* Text Input & Textarea */
.text-input,
.text-area {
  width: 100%;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input {
  height: 36px;
  padding: 0 12px;
}

.text-area {
  padding: 10px 12px;
  min-height: 114px;
  resize: vertical;
  line-height: 1.55;
}

.text-input::placeholder,
.text-area::placeholder {
  color: #96a8c6;
  font-weight: 400;
}

.text-input:hover,
.text-area:hover {
  border-color: var(--line-hv);
}

.text-input:focus,
.text-area:focus {
  outline: none;
  border-color: var(--fire);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
}

.field-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.45;
}

.field-hint strong {
  color: var(--ink);
  font-weight: 700;
}

.field.has-error .select-trigger,
.field.has-error .text-input,
.field.has-error .text-area {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(255, 154, 166, 0.18);
}

/* Notice Bar */
.notice-bar {
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(251, 146, 60, 0.09);
  border: 1px solid rgba(251, 146, 60, 0.26);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
}

.notice-bar strong {
  color: var(--fire-lit);
  font-weight: 700;
}

.notice-icon {
  width: 15px;
  height: 15px;
  color: var(--fire);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Order Summary Box */
.summary-box {
  margin-top: 12px;
  border-radius: var(--r2);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  padding: 12px 14px;
}

.summary-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
}

.summary-empty-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #93a6c8;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
}

.summary-label {
  color: var(--ink-3);
  font-weight: 500;
}

.summary-val {
  color: var(--ink);
  font-weight: 700;
}

.summary-unit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fee-pill {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.32);
}

.summary-divider {
  height: 1px;
  background: var(--line-soft);
  margin: 4px 0 2px;
}

.summary-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-total-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.summary-total-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.summary-fee-note {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.summary-total-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--ok);
  letter-spacing: -0.01em;
}

/* Primary CTA Button */
.cta-btn {
  margin-top: 14px;
  width: 100%;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: linear-gradient(96deg, var(--fire), var(--sun));
  color: var(--fire-ink);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.cta-btn:hover {
  filter: brightness(1.05);
}

.cta-btn:active {
  transform: translateY(1px);
}

.cta-arrow {
  width: 13px;
  height: 13px;
}

/* Right Panel: Carrier Tabs & Fee Table */
.discount-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ok);
  background: rgba(52, 216, 138, 0.14);
  border: 1px solid rgba(52, 216, 138, 0.32);
  flex-shrink: 0;
}

.carrier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(29, 42, 73, 0.45);
  border-bottom: 1px solid var(--line-soft);
}

.carrier-tab {
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: all 0.14s ease;
}

.carrier-tab:hover {
  color: var(--ink);
  border-color: var(--line-hv);
}

.carrier-tab.is-active {
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border-color: var(--fire);
  font-weight: 700;
}

.price-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.price-table thead th {
  background: var(--panel-2);
  padding: 9px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
}

.price-table thead th:first-child,
.price-table tbody td:first-child {
  text-align: left;
}

.price-table tbody tr {
  cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.13s ease;
}

.price-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.price-table tbody tr.is-selected {
  background: rgba(251, 146, 60, 0.14);
}

.price-table tbody td {
  padding: 8.5px 14px;
  font-size: 12.5px;
  line-height: 19px;
  text-align: right;
  font-weight: 600;
}

.price-table .col-face {
  color: var(--ink);
  font-weight: 700;
}

.price-table tbody tr.is-selected .col-face {
  color: var(--fire-lit);
}

.price-table .col-fee {
  color: var(--aura);
  font-weight: 700;
}

.price-table .col-receive {
  color: var(--gold);
  font-weight: 700;
}

.price-footnote {
  padding: 12px 14px 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.price-footnote strong {
  color: var(--ink);
  font-weight: 700;
}

/* Bottom Panel: History */
.history-panel {
  margin-top: 16px;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  height: 25px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: all 0.14s ease;
}

.filter-pill:hover {
  color: var(--ink);
  border-color: var(--line-hv);
}

.filter-pill.is-active {
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border-color: var(--fire);
  font-weight: 700;
}

.history-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r2);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.history-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.history-empty-icon svg {
  width: 18px;
  height: 18px;
}

.history-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.history-empty-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 340px;
  line-height: 1.45;
}

.history-empty-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.cta-btn--compact {
  margin-top: 0;
  width: auto;
  height: 32px;
  padding: 0 16px;
  font-size: 12.5px;
}

/* Auth Modal & Standalone Auth Page */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(11, 18, 36, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 18px;
  animation: fadeIn 0.16s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-standalone {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 44px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-back-link:hover {
  color: var(--fire-lit);
}

.auth-back-link svg {
  width: 14px;
  height: 14px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 56px rgba(4, 9, 24, 0.75), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
  animation: modalPop 0.18s ease;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--panel-header);
  border-bottom: 1px solid var(--line-soft);
}

.auth-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: all 0.14s ease;
}

.auth-close-btn:hover {
  color: var(--ink);
  border-color: var(--line-hv);
}

.auth-close-btn svg {
  width: 14px;
  height: 14px;
}

.auth-card-body {
  padding: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  height: 36px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.auth-tab:hover {
  color: var(--ink);
  border-color: var(--line-hv);
}

.auth-tab.is-active {
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border-color: var(--fire);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .text-input {
  padding-right: 38px;
}

.eye-btn {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: color 0.14s ease, background-color 0.14s ease;
}

.eye-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.eye-btn svg {
  width: 15px;
  height: 15px;
}

.field-error {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bad);
  line-height: 1.3;
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  accent-color: var(--fire);
  cursor: pointer;
  flex-shrink: 0;
}

.text-link {
  color: var(--fire-lit);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.14s ease;
}

.text-link:hover {
  color: var(--sun);
  text-decoration: underline;
}

/* Password Strength Bar */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.pw-strength-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  flex: 1;
}

.pw-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--panel-3);
  transition: background-color 0.18s ease;
}

.pw-strength[data-level="1"] .pw-bar:nth-child(1) { background: var(--bad); }
.pw-strength[data-level="2"] .pw-bar:nth-child(-n+2) { background: var(--gold); }
.pw-strength[data-level="3"] .pw-bar { background: var(--ok); }

.pw-strength-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  min-width: 66px;
  text-align: right;
}

.auth-demo-hint {
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(63, 208, 236, 0.08);
  border: 1px solid rgba(63, 208, 236, 0.24);
  font-size: 11.5px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.demo-fill-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--aura);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(63, 208, 236, 0.12);
  border: 1px solid rgba(63, 208, 236, 0.28);
  flex-shrink: 0;
  transition: filter 0.14s ease;
}

.demo-fill-btn:hover {
  filter: brightness(1.15);
}

/* Server-Verified SVG Captcha */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-box {
  height: 36px;
  min-width: 134px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--deep);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.captcha-box svg {
  display: block;
}

.captcha-refresh-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.captcha-refresh-btn:hover {
  color: var(--fire-lit);
  border-color: var(--fire);
}

.captcha-refresh-btn svg {
  width: 15px;
  height: 15px;
}

.captcha-row .text-input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.auth-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* Telegram OTP Verification */
.phone-otp-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.phone-otp-row .text-input {
  flex: 1;
  min-width: 0;
}

.otp-send-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  color: #e8f7ff;
  background: rgba(42, 171, 238, 0.18);
  border: 1px solid rgba(42, 171, 238, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.otp-send-btn:hover:not(:disabled) {
  background: rgba(42, 171, 238, 0.28);
  border-color: #2aabee;
}

.otp-send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.otp-send-btn svg {
  width: 14px;
  height: 14px;
  color: #38bdf8;
}

.otp-panel {
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.otp-tg-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(96deg, #229ed9, #2aabee);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: filter 0.15s ease;
}

.otp-tg-link:hover {
  filter: brightness(1.06);
}

.otp-tg-link svg {
  width: 15px;
  height: 15px;
}

.otp-demo-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  font-size: 11.5px;
  color: var(--ink-2);
}

.otp-demo-code {
  color: var(--sun);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.otp-digits-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.otp-digits {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  flex: 1;
}

.otp-digit {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  background: var(--panel-header);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--fire);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
}

.otp-verify-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fire-ink);
  background: linear-gradient(96deg, var(--fire), var(--sun));
  flex-shrink: 0;
  transition: filter 0.15s ease;
}

.otp-verify-btn:hover {
  filter: brightness(1.05);
}

.otp-verified-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(52, 216, 138, 0.13);
  border: 1px solid rgba(52, 216, 138, 0.34);
  font-size: 12px;
  font-weight: 700;
  color: var(--ok);
}

.otp-verified-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.otp-verified-left svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Main Feature Menu Tabs (Đổi thẻ cào / Rút tiền / Admin) */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  max-width: 100%;
  width: fit-content;
  border-radius: 12px;
  background: var(--panel-header);
  border: 1px solid var(--line-soft);
  box-shadow: var(--e1);
}

.main-nav-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.main-nav-btn svg {
  width: 15px;
  height: 15px;
}

.main-nav-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.main-nav-btn.is-active {
  color: var(--fire-ink);
  background: linear-gradient(96deg, var(--fire), var(--sun));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

/* Site Announcement Banner */
.site-notice {
  margin-bottom: 16px;
  padding: 12px 15px;
  border-radius: var(--r3);
  border: 1px solid rgba(251, 146, 60, 0.36);
  background: linear-gradient(95deg, rgba(251, 146, 60, 0.14), rgba(38, 52, 88, 0.92));
  box-shadow: var(--e1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.site-notice--ok {
  border-color: rgba(52, 216, 138, 0.36);
  background: linear-gradient(95deg, rgba(52, 216, 138, 0.13), rgba(38, 52, 88, 0.92));
}

.site-notice--bad {
  border-color: rgba(255, 154, 166, 0.42);
  background: linear-gradient(95deg, rgba(255, 154, 166, 0.14), rgba(38, 52, 88, 0.92));
}

.site-notice-left {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}

.site-notice-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(251, 146, 60, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.35);
  color: var(--sun);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.site-notice--ok .site-notice-icon {
  background: rgba(52, 216, 138, 0.18);
  border-color: rgba(52, 216, 138, 0.36);
  color: var(--ok);
}

.site-notice--bad .site-notice-icon {
  background: rgba(255, 154, 166, 0.18);
  border-color: rgba(255, 154, 166, 0.36);
  color: var(--bad);
}

.site-notice-icon svg {
  width: 15px;
  height: 15px;
}

.site-notice-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.site-notice-content {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
  white-space: pre-line;
}

.site-notice-close {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.site-notice-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.site-notice-close svg {
  width: 14px;
  height: 14px;
}

/* Withdraw Specific UI */
.balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: var(--r2);
  background: linear-gradient(95deg, rgba(251, 146, 60, 0.11), rgba(52, 216, 138, 0.08));
  border: 1px solid rgba(251, 146, 60, 0.28);
}

.balance-banner-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.balance-banner-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.quick-amt-btn {
  height: 25px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
  transition: all 0.13s ease;
}

.quick-amt-btn:hover {
  color: var(--fire-lit);
  border-color: var(--fire);
  background: rgba(251, 146, 60, 0.12);
}

.free-pill {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ok);
  background: rgba(52, 216, 138, 0.14);
  border: 1px solid rgba(52, 216, 138, 0.32);
}

/* Saved Accounts List (Right Panel) */
.saved-accounts {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saved-accounts-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.add-bank-toggle-btn {
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.36);
  transition: all 0.14s ease;
}

.add-bank-toggle-btn:hover {
  background: rgba(251, 146, 60, 0.24);
  border-color: var(--fire);
}

.add-bank-form {
  padding: 11px;
  border-radius: 10px;
  background: var(--panel-header);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mini-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.mini-method-btn {
  height: 28px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: all 0.13s ease;
}

.mini-method-btn.is-active {
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border-color: var(--fire);
}

.add-bank-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.add-bank-actions .cta-btn {
  margin-top: 0;
  height: 32px;
  font-size: 12px;
  flex: 1;
}

.add-bank-cancel {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}

.add-bank-cancel:hover {
  color: var(--ink);
  border-color: var(--line-hv);
}

.saved-accounts-empty {
  padding: 12px 10px;
  border-radius: 8px;
  border: 1px dashed var(--line-soft);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.45;
}

.saved-account-card {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.saved-account-card:hover {
  border-color: var(--fire);
  background: rgba(251, 146, 60, 0.1);
}

.saved-account-card.is-selected {
  border-color: var(--fire);
  background: rgba(251, 146, 60, 0.14);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.no-bank-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px dashed var(--line);
  background: var(--panel-2);
  font-size: 12.5px;
  color: var(--ink-3);
}

.saved-acc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.saved-acc-use-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.saved-acc-use-btn:hover {
  background: rgba(251, 146, 60, 0.25);
}

.saved-acc-del-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  transition: all 0.14s ease;
}

.saved-acc-del-btn:hover {
  color: var(--bad);
  border-color: rgba(255, 154, 166, 0.45);
  background: rgba(255, 154, 166, 0.12);
}

.saved-acc-del-btn svg {
  width: 12px;
  height: 12px;
}

.saved-acc-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.saved-acc-bank {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.saved-acc-num {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.saved-acc-use {
  font-size: 11px;
  font-weight: 700;
  color: var(--fire-lit);
  flex-shrink: 0;
}

.rules-list {
  list-style: none;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.45;
}

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fire);
  margin-top: 6px;
  flex-shrink: 0;
}

.rules-list strong {
  color: var(--ink);
  font-weight: 700;
}

/* Admin Dashboard */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r3);
  padding: 14px 16px;
  box-shadow: var(--e1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.kpi-value {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.kpi-value--gold { color: var(--gold); }
.kpi-value--ok { color: var(--ok); }
.kpi-value--fire { color: var(--fire-lit); }

.kpi-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Per-Provider Reconciliation Grid */
.provider-recon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.recon-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r3);
  padding: 13px 16px;
  box-shadow: var(--e1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.recon-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.recon-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.recon-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.recon-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recon-m-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}

.recon-m-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.recon-m-val--aura { color: var(--aura); }
.recon-m-val--gold { color: var(--gold); }
.recon-m-val--ok { color: var(--ok); }

@media (max-width: 900px) {
  .provider-recon-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .recon-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.act-btn {
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.act-btn--ok {
  color: var(--ok);
  background: rgba(52, 216, 138, 0.14);
  border: 1px solid rgba(52, 216, 138, 0.34);
}

.act-btn--ok:hover {
  background: rgba(52, 216, 138, 0.25);
}

.act-btn--bad {
  color: var(--bad);
  background: rgba(255, 154, 166, 0.12);
  border: 1px solid rgba(255, 154, 166, 0.34);
}

.act-btn--bad:hover {
  background: rgba(255, 154, 166, 0.24);
}

.act-btn--amber {
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.34);
}

.act-btn--amber:hover {
  background: rgba(251, 146, 60, 0.24);
}

.fee-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.fee-editor-item {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fee-editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fee-editor-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}

.fee-editor-face {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.fee-editor-input-row {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 84px;
}

.fee-editor-input-row .text-input {
  height: 30px;
  padding: 0 7px;
  text-align: right;
  font-weight: 700;
}

.fee-editor-preview {
  font-size: 11.5px;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fee-editor-profit {
  font-size: 11.5px;
  color: var(--ok);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bal-adjust-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bal-adjust-input {
  width: 96px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  html,
  body {
    overflow-x: hidden;
  }

  .page-header {
    align-items: flex-start;
  }

  .header-auth {
    flex-wrap: wrap;
    width: 100%;
  }

  .user-bar {
    width: 100%;
    justify-content: space-between;
  }

  .main-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .panel-header {
    padding: 11px 13px;
  }

  .panel-title {
    white-space: normal;
    line-height: 1.3;
  }

  .panel-body {
    padding: 13px;
  }

  .add-bank-actions {
    flex-wrap: wrap;
  }

  .add-bank-actions > * {
    flex: 1 1 100%;
  }

  .phone-otp-row {
    flex-wrap: wrap;
  }

  .phone-otp-row .otp-send-btn {
    width: 100%;
    justify-content: center;
  }

  .fee-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-table td[colspan] {
    text-align: left !important;
  }
}

@media (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi-card {
    padding: 11px 12px;
  }

  .kpi-value {
    font-size: 17px;
  }

  .fee-editor-grid {
    grid-template-columns: 1fr;
  }
}

.history-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--r2);
  border: 1px solid var(--line-soft);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  min-width: 780px;
}

.history-table thead th {
  background: var(--panel-2);
  padding: 9px 12px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.history-table thead th.num,
.history-table tbody td.num {
  text-align: right;
}

.history-table tbody td {
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.order-code {
  font-weight: 700;
  color: var(--ink);
}

.card-codes {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.card-codes .pin-line {
  color: var(--ink);
  font-weight: 600;
}

.card-codes .seri-line {
  color: var(--ink-3);
}

.order-receive {
  font-weight: 700;
  color: var(--gold);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-badge--ok {
  color: var(--ok);
  background: rgba(52, 216, 138, 0.14);
  border: 1px solid rgba(52, 216, 138, 0.3);
}

.status-badge--pending {
  color: var(--fire-lit);
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.32);
}

.status-badge--error {
  color: var(--bad);
  background: rgba(255, 154, 166, 0.14);
  border: 1px solid rgba(255, 154, 166, 0.32);
}

/* Toast Notifications */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
}

/* Floating Customer Support Widget */
.support-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
}

.support-fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fire), var(--sun));
  color: var(--fire-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(251, 146, 60, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.support-fab:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.06);
}

.support-fab svg {
  width: 22px;
  height: 22px;
}

.support-popover {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: 290px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(3, 7, 18, 0.78);
  overflow: hidden;
  animation: modalPop 0.16s ease;
}

.support-popover-header {
  padding: 12px 14px;
  background: var(--panel-header);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.support-popover-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.support-popover-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-note {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.support-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.support-item:hover {
  border-color: var(--fire);
  background: rgba(251, 146, 60, 0.12);
}

.support-item-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.support-item-badge--tg { background: rgba(42, 171, 238, 0.18); color: #38bdf8; }
.support-item-badge--zalo { background: rgba(27, 92, 255, 0.2); color: #7aa7ff; }
.support-item-badge--fb { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.support-item-badge--tel { background: rgba(52, 216, 138, 0.18); color: var(--ok); }

.support-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.support-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.support-item-sub {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  background: #223052;
  border: 1px solid var(--line);
  border-left: 3px solid var(--fire);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 14px 32px rgba(3, 7, 18, 0.7);
  animation: toastIn 0.2s ease forwards;
}

.toast--ok {
  border-left-color: var(--ok);
}

.toast--err {
  border-left-color: var(--bad);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 960px) {
  .topup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .topup-page {
    padding: 18px 14px 40px;
  }

  .page-title {
    font-size: clamp(19px, 5.4vw, 23px);
  }

  .mode-switcher,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
