/* Wallet page — premium mobile */
.wallet-page {
  --wl-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wl-ink: #0f172a;
  --wl-muted: #64748b;
  --wl-line: #e8ecf2;
  --wl-radius: 18px;
  --wl-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 12px 28px -8px rgba(15, 23, 42, 0.1);
  font-family: var(--wl-font);
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

.wallet-page #site-main { padding: 0; }

/* Top bar — ขาว ไม่ชนกับ hero เขียว */
.wallet-page .top-bar {
  background: #fff;
  color: var(--wl-ink);
  border-bottom: 1px solid var(--wl-line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.wallet-page .top-bar .top-back,
.wallet-page .top-bar .top-title,
.wallet-page .top-bar .top-right { color: var(--wl-ink); }

.wallet-page .lang-btn-sm {
  background: #f8fafc;
  border-color: var(--wl-line);
  color: var(--wl-ink);
}

.wallet-page .g-logo-circle-sm {
  background: #fff;
  border: 1px solid var(--wl-line);
  box-shadow: none;
}

.wallet-page .top-brand-logo {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* การ์ดยอดเงิน — พื้นขาว + เขียวแค่ตัวเลข */
.wallet-page .wallet-hero {
  margin: 12px 16px 0;
  padding: 22px 20px 20px;
  border-radius: var(--wl-radius);
  background: #fff;
  box-shadow: var(--wl-shadow);
  border: 1px solid var(--wl-line);
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--wl-ink);
}

.wallet-page .wallet-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #28D9CE);
  pointer-events: none;
}

.wallet-page .wallet-hero::after { display: none; }

.wallet-page .wallet-hero .wh-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wl-muted);
}

.wallet-page .wallet-hero .wh-amount {
  font-size: 38px;
  font-weight: 800;
  margin: 8px 0 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  color: var(--wl-ink);
}

.wallet-page .wallet-hero .wh-amount .cur {
  font-size: 22px;
  font-weight: 700;
  color: #16a34a;
}

.wallet-page .wallet-hero .wh-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--wl-muted);
  letter-spacing: 0.02em;
}

.wl-body {
  margin-top: 12px;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom, 0));
  animation: wl-fadeIn 0.4s ease-out;
}

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

.wallet-page .wallet-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0;
  margin-bottom: 12px;
  background: #fff;
  border-radius: var(--wl-radius);
  padding: 16px 12px;
  box-shadow: var(--wl-shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.wallet-page .wa-btn {
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
  border: 1px solid var(--wl-line);
  border-radius: 14px;
  padding: 12px 6px;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.wallet-page .wa-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.wallet-page .wa-btn:active {
  transform: scale(0.97);
  background: #f8fafc;
}

.wallet-page .wa-btn i {
  font-size: 20px;
  color: #475569;
}

.wallet-page .wa-btn--primary i {
  color: #16a34a;
}

.wallet-page .wallet-service-btn {
  width: 100%;
  margin: 0 0 14px;
  background: #fff;
  border: 1px solid var(--wl-line);
  box-shadow: var(--wl-shadow);
}

.wallet-page .wallet-service-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.wallet-page .wallet-service-btn__icon {
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
}

.wallet-page .divider { display: none; }

.wl-filters {
  display: flex;
  gap: 8px;
  padding: 4px 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.wl-filters::-webkit-scrollbar { display: none; }

.wl-filter {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--wl-line);
  background: #fff;
  font-family: var(--wl-font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wl-muted);
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wl-filter:hover {
  border-color: #cbd5e1;
  color: var(--wl-ink);
}

.wl-filter.is-active {
  background: #fff;
  border-color: #16a34a;
  color: #15803d;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15);
}

.wl-tx-panel {
  background: #fff;
  border-radius: var(--wl-radius);
  box-shadow: var(--wl-shadow);
  border: 1px solid rgba(255, 255, 255, 0.95);
  overflow: hidden;
}

.wl-tx-head {
  padding: 14px 16px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wl-ink);
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wl-tx-head i { color: #64748b; }

.wallet-page .tx-row {
  border-bottom: 1px solid #f1f5f9;
  padding: 14px 16px !important;
  gap: 12px !important;
  transition: background 0.15s;
}

.wallet-page .tx-row:last-child { border-bottom: none; }

.wallet-page .tx-row:active { background: #fafbfc; }

.wl-tx-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid var(--wl-line);
}

.wl-tx-ph {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 18px;
  border: 1px solid var(--wl-line);
}

.wl-tx-body { flex: 1; min-width: 0; }

.wl-tx-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--wl-ink);
  line-height: 1.45;
  word-break: break-word;
}

.wl-tx-meta {
  font-size: 11px;
  color: var(--wl-muted);
  margin-top: 3px;
  font-weight: 500;
}

.wl-tx-sub {
  font-size: 11.5px;
  color: #475569;
  margin-top: 4px;
}

.wl-tx-side {
  text-align: right;
  flex-shrink: 0;
}

.wl-tx-amt {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #16a34a;
}

.wl-tx-amt.neg { color: #e11d48; }

.wl-tx-tag {
  font-size: 10px;
  color: var(--wl-muted);
  margin-top: 3px;
  font-weight: 600;
}

.wl-badge-bonus {
  font-size: 10px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
  font-weight: 700;
  vertical-align: middle;
}

.wl-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--wl-muted);
  font-size: 13px;
}

.wl-empty i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: #cbd5e1;
}

/* Transfer modal */
.wallet-page #tfModal {
  backdrop-filter: blur(6px);
}

.wallet-page #tfModal > div {
  border-radius: 24px 24px 0 0 !important;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0)) !important;
  max-width: 480px;
}

.wl-tf-title {
  text-align: center;
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 800;
  color: var(--wl-ink);
}

.wl-tf-title i { color: var(--primary); margin-right: 6px; }

.wallet-page .field-wrap label {
  font-size: 12px;
  font-weight: 600;
  color: var(--wl-muted);
}

.wallet-page .field-wrap input {
  border-radius: 12px;
  border: 1.5px solid var(--wl-line);
  padding: 12px 14px;
  font-family: var(--wl-font);
}

.wallet-page .field-wrap input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 192, 30, 0.12);
}

.wallet-page .btn-primary {
  border-radius: 100px;
  font-weight: 700;
  background: linear-gradient(180deg, #22c55e, #15803d);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
}

.wallet-page .btn-outline {
  border-radius: 100px;
  font-weight: 600;
}
