.head h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.2fr);
  gap: 1.2rem;
  align-items: start;
}

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .quick-amounts {
    grid-template-columns: repeat(2, 1fr);
  }

  .balance-num {
    font-size: 1.5rem !important;
  }
}

/* แท็บสลับ เติม/ถอน */
.wallet-tabs {
  display: flex;
  gap: 0.5rem;
}

.wallet-tab {
  flex: 1;
  padding: 0.6rem;
  border-radius: 0.7rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(31, 41, 55, 0.95);
  color: #94a3b8;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.15s;
}

.wallet-tab.active {
  background: linear-gradient(135deg, #5b8bc4, #0ea5e9);
  color: #020617;
  border-color: transparent;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #cbd5e1;
}

/* คอลัมน์ซ้าย: ซ้อน 3 โซน (ยอดเงิน / เติม / ถอน) */
.col-left {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
}

/* หัวข้อแต่ละโซน */
.zone-head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.zone-icon {
  font-size: 1.4rem;
  line-height: 1.2;
}

.zone-title {
  font-size: 1rem;
  font-weight: 700;
}

.zone-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-top: 0.1rem;
}

.zone-topup {
  background:
    radial-gradient(circle at top left, rgba(91, 139, 196, 0.10), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(91, 139, 196, 0.35);
}

.zone-withdraw {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.balance-card {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.balance-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.balance-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: #8badd6;
  margin: 0.3rem 0 0;
}

.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .rank-grid {
    grid-template-columns: 1fr;
  }
}

.rank-card {
  background: #0d1424;
  border: 1px solid #1b2740;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
}

.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.rank-side {
  font-size: 0.72rem;
  color: #7f92b3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.rank-tier {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.rank-rate {
  font-size: 0.78rem;
  color: #94a3b8;
}

.rank-rate b {
  color: #4ade80;
}

.rank-bar {
  height: 7px;
  background: #1b2740;
  border-radius: 99px;
  overflow: hidden;
  margin: 0.55rem 0 0.35rem;
}

.rank-bar>i {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}

.rank-next {
  font-size: 0.72rem;
  color: #7f92b3;
}

.rank-next b {
  color: #cdd8ee;
}

/* tier colors */
.tier-Iron {
  color: #9ca3af;
}

.tier-Iron .dot {
  background: #9ca3af;
}

.tier-Bronze {
  color: #c88a54;
}

.tier-Bronze .dot {
  background: #c88a54;
}

.tier-Silver {
  color: #cbd5e1;
}

.tier-Silver .dot {
  background: #cbd5e1;
}

.tier-Gold {
  color: #fbbf24;
}

.tier-Gold .dot {
  background: #fbbf24;
}

.tier-Platinum {
  color: #67e8f9;
}

.tier-Platinum .dot {
  background: #67e8f9;
}

.tier-Diamond {
  color: #a78bfa;
}

.tier-Diamond .dot {
  background: #a78bfa;
}

.rank-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.input {
  background: #0b1228;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 0.5rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}

.input:focus {
  border-color: rgba(56, 189, 248, 0.9);
}

.btn-primary {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #5b8bc4, #0ea5e9);
  color: #020617;
  margin-top: 0.6rem;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.quick-btn {
  padding: 0.4rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.82rem;
}

.quick-btn:hover {
  border-color: rgba(56, 189, 248, 0.7);
}

.tx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 0.85rem;
}

.tx-row:first-of-type {
  border-top: none;
}

.tx-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.tx-tab {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(31, 41, 55, 0.95);
  color: #94a3b8;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s;
}

.tx-tab.active {
  background: linear-gradient(135deg, #5b8bc4, #0ea5e9);
  color: #020617;
  border-color: transparent;
}

.tx-amount.in {
  color: #8badd6;
  font-weight: 700;
}

.tx-amount.out {
  color: #fca5a5;
  font-weight: 700;
}

.tx-meta {
  font-size: 0.72rem;
  opacity: 0.65;
}

.alert.ok {
  background: rgba(91, 139, 196, 0.15);
  border: 1px solid rgba(91, 139, 196, 0.5);
  color: #a9c8e5;
}
