/* ===== WITHDRAW ===== */

.withdraw-balance {
  position: relative;
  background: linear-gradient(160deg, #0D0D0D 0%, #1A1A2E 50%, #0D0D0D 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-2xl);
  padding: 32px 28px 28px;
  margin: 24px 0 16px;
  text-align: center;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 24px 64px rgba(0,0,0,0.40);
}

/* Glow orb */
.withdraw-balance::before {
  content: '';
  position: absolute;
  width: 460px; height: 280px;
  background: radial-gradient(ellipse, rgba(80,60,200,0.28) 0%, transparent 72%);
  border-radius: 50%;
  top: -140px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Grid texture */
.withdraw-balance::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.wb-label {
  font-size: 10px;
  color: rgba(255,255,255,0.35) !important;
  text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 700; margin-bottom: 8px;
  position: relative; z-index: 1;
}

.wb-amount {
  font-size: 52px; font-weight: 900;
  letter-spacing: -0.04em;
  color: #FFFFFF !important;
  line-height: 1;
  margin-bottom: 8px;
  position: relative; z-index: 1;
  text-shadow: 0 2px 20px rgba(255,255,255,0.10);
}
@media (min-width: 768px) { .wb-amount { font-size: 68px; } }

.wb-pending {
  font-size: 13px;
  color: rgba(255,255,255,0.40) !important;
  position: relative; z-index: 1;
}
.wb-pending strong { color: #4ADE80 !important; font-weight: 700; }

/* Quick amounts */
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quick-btn {
  padding: 12px 8px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.quick-btn:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}
.quick-btn.active {
  background: var(--gold-dim);
  border-color: rgba(255,255,255,0.22);
  color: var(--gold-light);
}

/* Amount input */
.amount-input-wrap {
  position: relative;
}
.amount-prefix {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; font-weight: 700; color: var(--text-muted);
  pointer-events: none;
}
.amount-input {
  padding-left: 36px;
  font-size: 20px; font-weight: 700;
}
.input-hint {
  font-size: 12px; color: var(--red);
  min-height: 16px;
}
.input-hint.ok { color: var(--green); }

/* Methods */
.methods-list {
  display: flex; flex-direction: column; gap: 10px;
}

.method-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.method-item:hover { border-color: var(--border-bright); }

.method-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}
.method-icon img {
  width: 34px; height: 34px;
  object-fit: contain;
  display: block;
}

.method-info { flex: 1; }
.method-name {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
}
.method-detail {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}

.method-item.selected {
  border-color: var(--border-gold);
  background: var(--gold-dim);
}
.method-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.method-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border-bright);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.method-check.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.method-delete-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--red-dim);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  transition: background var(--transition);
  flex-shrink: 0;
}
.method-delete-btn:hover { background: rgba(220,38,38,0.16); }

/* Empty state */
.methods-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 16px; text-align: center; color: var(--text-muted);
}
.methods-empty svg { opacity: 0.35; }
.methods-empty p { font-size: 14px; margin: 0; }

/* ─── Add-method drawer ─── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(9,12,28,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.add-method-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 0 20px calc(env(safe-area-inset-bottom) + 32px);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.34,1.2,0.64,1);
  box-shadow: 0 -8px 40px rgba(9,12,28,0.15);
}
.add-method-drawer.open { transform: translateY(0); }

.drawer-handle {
  width: 40px; height: 4px;
  background: var(--graphite-3);
  border-radius: 2px;
  margin: 14px auto 22px;
}
.drawer-title {
  font-size: 18px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 18px;
}
.type-pills {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.type-btn {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-base);
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.type-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.drawer-label {
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.drawer-input {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  font-size: 18px; font-weight: 600;
  color: var(--text-primary);
  transition: border-color 0.15s;
  margin-bottom: 16px;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.drawer-input:focus { outline: none; border-color: var(--gold); }

/* Submit area */
.withdraw-note {
  text-align: center;
  font-size: 12px; color: var(--text-muted);
  margin-top: 12px; line-height: 1.6;
}

/* Withdrawals history */
.withdrawals-list { display: flex; flex-direction: column; }

.wd-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.wd-item:last-child { border-bottom: none; padding-bottom: 0; }
.wd-item:first-child { padding-top: 0; }

.wd-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.wd-info { flex: 1; }
.wd-method { font-size: 14px; font-weight: 600; }
.wd-date   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.wd-right { text-align: right; }
.wd-amount {
  font-size: 15px; font-weight: 800;
  color: var(--text-primary);
}
.wd-status {
  margin-top: 4px;
}

/* Section block (reuse from dashboard) */
.section-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 14px;
}
.block-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.block-title { font-size: 16px; font-weight: 700; }
.block-link {
  font-size: 13px; color: var(--gold);
  font-weight: 500; cursor: pointer; transition: var(--transition);
}
.block-link:hover { color: var(--gold-light); }

/* ===== SUCCESS MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(9,12,28,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal-overlay.visible {
  opacity: 1; pointer-events: auto;
}

.modal-card {
  position: relative;
  background: linear-gradient(175deg, #FFFFFF 0%, #F4F5F9 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 44px 28px 32px;
  max-width: 340px; width: 100%;
  text-align: center;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.6) inset,
    0 30px 70px rgba(9,12,28,0.28),
    0 0 50px rgba(58,92,197,0.08);
  animation: modalPop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
}

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

/* Orb glow */
.modal-orb {
  position: absolute;
  width: 340px; height: 230px;
  background: radial-gradient(ellipse, rgba(22,163,74,0.10) 0%, transparent 72%);
  border-radius: 50%;
  top: -90px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}

/* Confetti */
.modal-confetti {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.modal-confetti span {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 1.2s ease forwards;
}
.modal-confetti span:nth-child(1) { background:#16A34A; left:15%; top:10%; animation-delay:0.05s; transform:rotate(20deg); }
.modal-confetti span:nth-child(2) { background:#3A5CC5; left:30%; top:5%;  animation-delay:0.15s; width:4px; height:10px; }
.modal-confetti span:nth-child(3) { background:#16A34A; left:55%; top:8%;  animation-delay:0.10s; border-radius:50%; opacity:0.6; }
.modal-confetti span:nth-child(4) { background:#7A96F0; left:70%; top:12%; animation-delay:0.20s; width:4px; height:4px; border-radius:50%; }
.modal-confetti span:nth-child(5) { background:#16A34A; left:82%; top:6%;  animation-delay:0.08s; transform:rotate(-30deg); }
.modal-confetti span:nth-child(6) { background:#3A5CC5; left:90%; top:18%; animation-delay:0.18s; width:5px; height:8px; }
.modal-confetti span:nth-child(7) { background:#7A96F0; left:8%;  top:22%; animation-delay:0.25s; transform:rotate(45deg); }
.modal-confetti span:nth-child(8) { background:#16A34A; left:48%; top:3%;  animation-delay:0.12s; border-radius:50%; width:5px; height:5px; }

@keyframes confettiFall {
  0%   { opacity:0; transform: translateY(-10px) rotate(0deg) scale(0); }
  20%  { opacity:1; }
  100% { opacity:0; transform: translateY(80px) rotate(180deg) scale(1); }
}

/* Icon */
.modal-icon-wrap {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 24px;
}
.modal-icon-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #16A34A, #4ADE80, #16A34A) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: ringPulse 2.5s ease infinite;
}
@keyframes ringPulse {
  0%,100% { opacity:1; transform:scale(1); box-shadow: 0 0 0 0 rgba(22,163,74,0); }
  50%      { opacity:0.7; transform:scale(1.06); }
}
.modal-icon {
  position: absolute; inset: 8px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1px solid rgba(22,163,74,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #16A34A;
}

/* Label above title */
.modal-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
  position: relative;
}

/* Big amount */
.modal-title {
  font-size: 42px; font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 10px;
  position: relative;
}

.modal-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  position: relative;
}

/* Info row */
.modal-info-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 12px;
  margin-bottom: 24px;
  position: relative;
}
.modal-info-item {
  flex: 1;
  text-align: center;
}
.modal-info-val {
  font-size: 15px; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.modal-info-key {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.modal-info-divider {
  width: 1px; height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* Button */
.modal-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50px;
  font-size: 15px; font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-gold);
}
.modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(58,92,197,0.32);
}
.modal-btn:active { transform: translateY(0); }
