<?php require_once __DIR__.'/app_shell.php';require_user();app_head('Withdraw');app_open('withdraw','Withdraw');?>
<div class="page-heading"><div><h2>Request a withdrawal</h2><p>Send a crypto withdrawal request from your available account balance.</p></div></div><section class="grid-2"><form class="panel" id="withdrawForm"><div class="panel-title"><h3>Withdrawal details</h3><span>Crypto only</span></div><div id="withdrawAlertContainer"></div><div class="notice" style="margin-bottom:15px">Available balance: <b>£<span id="userUsdBalance">—</span></b></div><input type="hidden" name="withdrawal_type" value="crypto"><div class="field"><label>Cryptocurrency</label><select id="withdrawCrypto" name="cryptoType" required><option value="">Select an asset</option><option value="BTC">Bitcoin (BTC)</option><option value="ETH">Ethereum (ETH)</option><option value="USDT">Tether (USDT)</option></select></div><div class="field"><label>Withdrawal amount (GBP)</label><input id="withdrawUsdAmount" name="usdAmount" type="number" min="1" step="0.01" required></div><div class="field"><label>Destination wallet address</label><input id="withdrawWallet" name="walletAddress" required placeholder="Paste the receiving wallet address"></div><div class="field"><label>Estimated amount</label><input id="hiddenCryptoAmount" name="cryptoAmount" readonly required><small id="conversionNote" style="color:#64748b">Live estimate shown after selecting an asset.</small></div><button class="btn-v" id="previewButton" type="submit">Submit withdrawal request</button></form><aside class="panel"><div class="panel-title"><h3>Withdrawal review</h3></div><div class="action-list"><div class="action"><i class="bi bi-shield-check"></i><span><b>Address verification</b>Double-check the asset and recipient address. Transfers cannot be reversed.</span></div><div class="action"><i class="bi bi-hourglass-split"></i><span><b>Review status</b>Submitted requests are recorded as pending until reviewed.</span></div></div></aside></section><script>window.APP_BASE=<?=json_encode(APP_BASE)?></script><script src="<?=APP_BASE?>/withdrawals.js"></script><?php app_close();?>