/* =========================================================================
   提領中心 · Withdraw Center
   延續 NX AI 淺色科技風;Hero 深色科技風;卡片延用 mem-card 語言
   ========================================================================= */

/* ---------- Content wrapper ---------- */
.wd-content {
  padding: 20px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .wd-content { padding: 16px 18px 32px; gap: 20px; }
}

/* ==========================================================================
   1. HERO BANNER — 深色科技風,較短版
   ========================================================================== */
.wd-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(120% 140% at 15% 0%, #0F172A 0%, #0B1220 50%, #050914 100%);
  color: #E5EDFF;
  padding: 42px 44px 46px;
  isolation: isolate;
  border: 1px solid rgba(96, 165, 250, 0.18);
  box-shadow:
    0 22px 44px -18px rgba(9, 14, 32, 0.5),
    0 2px 0 rgba(147, 197, 253, 0.08) inset;
}
.wd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.10) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 100% at 60% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 60% 40%, #000 20%, transparent 78%);
  z-index: 0;
  pointer-events: none;
}
.wd-hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -30%;
  width: 480px;
  height: 480px;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.28), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* 右側裝飾 icon */
.wd-hero-art {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

.wd-hero-body {
  position: relative;
  z-index: 2;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wd-hero-key {
  font-family: var(--nx-font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #93C5FD;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wd-hero-key::before {
  content: "";
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, #60A5FA, transparent);
}
.wd-hero-title {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: var(--nx-ls-tight);
  color: #F8FAFF;
  margin: 0;
}
.wd-hero-sub {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(226, 232, 255, 0.72);
  margin: 0;
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .wd-hero { padding: 32px 22px 34px; }
  .wd-hero-art { display: none; }
  .wd-hero-title { font-size: 28px; }
}

/* ==========================================================================
   2. Section 標題(共用)
   ========================================================================== */
.wd-sect-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 2px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.wd-sect-head h2 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--nx-ink-900);
  letter-spacing: var(--nx-ls-snug);
  margin: 0;
}
.wd-sect-head .en {
  font-family: var(--nx-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--nx-ink-400);
  text-transform: uppercase;
}

/* ==========================================================================
   3. 卡片(bank / apply / notice 共用外殼)
   ========================================================================== */
.wd-card {
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 18px;
  padding: 26px 28px 28px;
  box-shadow: var(--nx-shadow-md);
}
.wd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.wd-card-head .title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--nx-ink-900);
  letter-spacing: var(--nx-ls-snug);
}
.wd-card-head .title .ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(6, 182, 212, 0.10));
  color: var(--nx-primary);
  display: grid;
  place-items: center;
}
.wd-card-head .title .ico svg { width: 16px; height: 16px; }

.wd-card-head .bound-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #10B981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
}
.wd-card-head .bound-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

/* ==========================================================================
   4. 提領帳戶 — 銀行資訊欄位(格狀)
   ========================================================================== */
.wd-bank-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
}
.wd-bank-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px dashed rgba(15, 23, 42, 0.06);
}
.wd-bank-field:nth-child(1),
.wd-bank-field:nth-child(2) {
  border-top: 0;
  padding-top: 0;
}
.wd-bank-field .label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--nx-ink-400);
}
.wd-bank-field .value {
  font-size: 16px;
  font-weight: 600;
  color: var(--nx-ink-900);
  letter-spacing: -0.005em;
}
.wd-bank-field .value.mono {
  font-family: var(--nx-font-mono);
  letter-spacing: 0.03em;
  font-weight: 500;
  font-size: 15px;
}
.wd-bank-field .value .mask {
  color: var(--nx-ink-300);
  letter-spacing: 0.14em;
  margin-left: 4px;
}

.wd-bank-note {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.03);
  font-size: 12.5px;
  color: var(--nx-ink-500);
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.wd-bank-note svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--nx-ink-400);
}

@media (max-width: 640px) {
  .wd-bank-fields { grid-template-columns: 1fr; gap: 12px 0; }
  .wd-bank-field:nth-child(2) {
    border-top: 1px dashed rgba(15, 23, 42, 0.06);
    padding-top: 10px;
  }
}

/* ==========================================================================
   5. 提領申請 — 表單
   ========================================================================== */
.wd-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.wd-field-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--nx-ink-600);
  margin-bottom: 10px;
  display: block;
}

/* Input wrapper with suffix "Energy" */
.wd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--nx-line-strong);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.wd-input-wrap:hover { border-color: rgba(37, 99, 235, 0.35); }
.wd-input-wrap:focus-within {
  border-color: var(--nx-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}
.wd-input-wrap.is-error {
  border-color: var(--nx-danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10);
}

.wd-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 16px 20px;
  font-family: var(--nx-font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--nx-ink-900);
  letter-spacing: 0.02em;
  width: 100%;
  -moz-appearance: textfield;
}
.wd-input::-webkit-outer-spin-button,
.wd-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wd-input::placeholder {
  color: var(--nx-ink-300);
  font-weight: 500;
}
.wd-input-suffix {
  padding: 0 20px;
  font-family: var(--nx-font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--nx-ink-500);
  text-transform: uppercase;
  border-left: 1px solid var(--nx-line);
  align-self: stretch;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.02);
}

.wd-help-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 20px;
}
.wd-help {
  font-size: 12.5px;
  color: var(--nx-ink-500);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wd-help .k {
  font-family: var(--nx-font-mono);
  color: var(--nx-ink-700);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.wd-help.is-error {
  color: var(--nx-danger);
}

/* Submit button */
.wd-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.42);
  width: 100%;
  margin-top: 6px;
}
.wd-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.5);
}
.wd-submit:active { transform: translateY(0); }
.wd-submit:disabled {
  background: rgba(15, 23, 42, 0.10);
  color: var(--nx-ink-400);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.wd-submit svg { width: 16px; height: 16px; }

/* ==========================================================================
   6. 注意事項卡片
   ========================================================================== */
.wd-notice {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--nx-line);
  border-radius: 16px;
  padding: 22px 24px 24px;
}
.wd-notice-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.wd-notice-head .ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.10);
  color: #B45309;
  display: grid;
  place-items: center;
}
.wd-notice-head .ico svg { width: 14px; height: 14px; }
.wd-notice-head .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--nx-ink-900);
  letter-spacing: var(--nx-ls-snug);
}
.wd-notice-head .en {
  font-family: var(--nx-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--nx-ink-400);
  text-transform: uppercase;
  margin-left: auto;
}
.wd-notice ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wd-notice ul li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--nx-ink-600);
  text-wrap: pretty;
  font-weight: 400;
}
.wd-notice ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.75em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nx-ink-400);
}

/* ==========================================================================
   7. 確認 Modal / 成功 Modal
   ========================================================================== */
.wd-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
  animation: wdFadeIn 0.18s ease-out;
}
.wd-modal.is-open { display: flex; }
@keyframes wdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wd-modal-panel {
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35);
  width: 100%;
  max-width: 440px;
  padding: 30px 30px 26px;
  animation: wdPanelIn 0.22s ease-out;
}
@keyframes wdPanelIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.wd-modal-key {
  font-family: var(--nx-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--nx-primary);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.wd-modal-key::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}
.wd-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--nx-ink-900);
  letter-spacing: var(--nx-ls-snug);
  margin: 0 0 20px;
  line-height: 1.25;
}

.wd-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 12px;
  margin-bottom: 16px;
}
.wd-modal-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.wd-modal-field .label {
  font-family: var(--nx-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--nx-ink-400);
  text-transform: uppercase;
  flex-shrink: 0;
}
.wd-modal-field .value {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  color: var(--nx-ink-900);
  word-break: break-all;
}
.wd-modal-field .value.mono {
  font-family: var(--nx-font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 14px;
}
.wd-modal-field .value .amt {
  font-family: var(--nx-font-mono);
  font-size: 20px;
  color: var(--nx-primary);
  letter-spacing: 0.02em;
}
.wd-modal-field .value .unit {
  font-family: var(--nx-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--nx-ink-500);
  margin-left: 4px;
  text-transform: uppercase;
}
.wd-modal-field .value .mask {
  color: var(--nx-ink-300);
  letter-spacing: 0.14em;
  margin-left: 2px;
}

.wd-modal-warn {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #92400E;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.wd-modal-warn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: #B45309;
}

.wd-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}
.wd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.wd-btn.is-ghost {
  background: #fff;
  border-color: var(--nx-line-strong);
  color: var(--nx-ink-700);
}
.wd-btn.is-ghost:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.2);
}
.wd-btn.is-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.42);
}
.wd-btn.is-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -4px rgba(37, 99, 235, 0.5);
}

/* Success modal */
.wd-success-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.20), rgba(16, 185, 129, 0.04));
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  position: relative;
}
.wd-success-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(16, 185, 129, 0.35);
  animation: wdSpin 12s linear infinite;
}
@keyframes wdSpin {
  to { transform: rotate(360deg); }
}
.wd-success-ring svg {
  width: 32px;
  height: 32px;
  color: #10B981;
}

.wd-success-body {
  text-align: center;
}
.wd-success-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--nx-ink-900);
  letter-spacing: var(--nx-ls-snug);
  margin: 0 0 6px;
}
.wd-success-sub {
  font-size: 13.5px;
  color: var(--nx-ink-500);
  margin: 0 0 18px;
}
.wd-success-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.16);
  margin-bottom: 14px;
}
.wd-success-status .label {
  font-family: var(--nx-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--nx-ink-500);
  text-transform: uppercase;
}
.wd-success-status .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--nx-primary);
  font-family: var(--nx-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.wd-success-status .chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nx-primary);
  animation: wdPulse 1.6s ease-in-out infinite;
}
@keyframes wdPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.wd-success-hint {
  font-size: 12.5px;
  color: var(--nx-ink-500);
  line-height: 1.6;
  margin: 0 0 20px;
}
.wd-success-hint a {
  color: var(--nx-primary);
  text-decoration: none;
  font-weight: 600;
}
.wd-success-hint a:hover { text-decoration: underline; }

.wd-success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.wd-success-actions .wd-btn { min-width: 140px; }

/* ==========================================================================
   8. 綁定狀態切換 — 未綁定提示卡
   ========================================================================== */
.wd-empty-card {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 32px 40px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.wd-empty-ico {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--nx-primary, #2563EB);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.wd-empty-ico svg { width: 26px; height: 26px; }
.wd-empty-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--nx-ink-900);
  letter-spacing: -0.005em;
}
.wd-empty-desc {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--nx-ink-500);
  max-width: 360px;
}
.wd-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--nx-primary, #2563EB);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.45);
}
.wd-empty-btn:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -8px rgba(37, 99, 235, 0.55);
}
.wd-empty-btn svg { width: 15px; height: 15px; }

/* 已綁定樣態:顯示帳戶卡 / 表單 / 注意事項,隱藏空狀態 */
body.wd-bound   .wd-empty-card { display: none; }

/* 未綁定樣態:僅顯示未綁定提示;隱藏帳戶卡、提領申請、注意事項 */
body.wd-unbound .wd-empty-card { display: flex; }
body.wd-unbound .wd-sect-head,
body.wd-unbound .wd-card,
body.wd-unbound .wd-notice { display: none; }
