@extends('portal.layouts.master') @section('title', 'Funds') @section('page-title', 'Funds') @section('extra-css') /* ── Method tabs ── */ .method-tabs { display: flex; gap: 0; margin-bottom: 1.25rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; } .method-tab { flex: 1; padding: .65rem; text-align: center; cursor: pointer; background: var(--bg-card); color: var(--text-secondary); font-size: .78rem; font-weight: 600; transition: all .15s; border: none; outline: none; border-right: 1px solid var(--border); } .method-tab:last-child { border-right: none; } .method-tab:hover { background: var(--bg-tertiary); color: var(--text-primary); } .method-tab.active { background: var(--accent); color: #fff; } .method-tab i { display: block; font-size: 1.1rem; margin-bottom: .2rem; } .method-panel { display: none; } .method-panel.active { display: block; } /* ── Disclaimer ── */ .disclaimer-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: .85rem; margin-top: 1rem; } .disclaimer-box p { font-size: .75rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: .4rem; } .disclaimer-box label { font-size: .78rem; cursor: pointer; display: flex; align-items: flex-start; gap: .5rem; } .disclaimer-box input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; width: 16px; height: 16px; } .debit-notice { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); border-radius: 6px; padding: .5rem .75rem; margin-bottom: .75rem; font-size: .75rem; color: var(--accent); } .debit-notice i { margin-right: .3rem; } /* ── Balance badge ── */ .balance-badge { display: inline-flex; align-items: center; gap: .5rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .85rem; margin-bottom: 1.25rem; } .balance-badge .cur { font-size: .72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; } .balance-badge .val { font-size: 1.15rem; font-weight: 700; } /* ── History tabs ── */ .hist-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 0; } .hist-tab { padding: .6rem 1rem; font-size: .78rem; font-weight: 600; cursor: pointer; border: none; background: transparent; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all .15s; text-transform: uppercase; letter-spacing: .04em; } .hist-tab:hover { color: var(--text-primary); } .hist-tab.ht-active { color: var(--accent); border-bottom-color: var(--accent); } .hist-panel { display: none; padding: .75rem 0 0; } .hist-panel.ht-visible { display: block; } /* ── Tables ── */ .funds-table { width: 100%; border-collapse: collapse; } .funds-table th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); padding: .45rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; } .funds-table td { font-size: .82rem; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; } .funds-table tr:last-child td { border-bottom: none; } .funds-table tr:hover td { background: rgba(59,130,246,.04); } .status-badge { font-size: .65rem; font-weight: 700; padding: .18rem .45rem; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; } .sb-approved { background: rgba(14,203,129,.15); color: var(--green); } .sb-pending { background: rgba(245,158,11,.15); color: #f59e0b; } .sb-rejected { background: rgba(246,70,93,.15); color: var(--red); } .method-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; color: var(--text-secondary); } @endsection @section('content') @if(session('success'))
{{ session('success') }}
@endif @php $currencySymbols = ['USD' => '$', 'EUR' => '€', 'CAD' => 'CA$', 'AUD' => 'A$']; $mainSymbol = $currencySymbols[$mainCurrency] ?? ''; @endphp
{{-- ═══════════════════════════════════════════ LEFT: Withdrawal form ════════════════════════════════════════════ --}}
Request Withdrawal
{{-- Current balance --}}
Available balance · {{ $mainCurrency }}
{{ $mainSymbol }}{{ number_format($mainBalance, 2) }}
@if($errors->any())
{{ $errors->first() }}
@endif {{-- Method tabs --}}
@csrf {{-- Amount (no currency selector — uses main_currency on backend) --}}
{{ $mainSymbol }}
Max: {{ $mainSymbol }}{{ number_format($mainBalance, 2) }}
{{-- ═══ Crypto Panel ═══ --}}
{{-- ═══ Bank Transfer Panel ═══ --}}
Enter the routing code used by your bank.
{{-- ═══ Credit / Debit Card Panel ═══ --}}
Debit cards only. Withdrawals are processed exclusively to debit cards.
{{-- Disclaimer --}}

Withdrawal policy:

If your withdrawal amount is lower than or equal to your total deposit amount, funds are returned to the original payment method. Any profit above the deposit total will be transferred via an alternative payment method.

Open positions may be affected by a withdrawal. A stop-out may occur if margin falls below minimum levels.

Requests are reviewed by your account manager. Funds are released upon approval.

{{-- ═══════════════════════════════════════════ RIGHT: Transaction history (tabbed) ════════════════════════════════════════════ --}}
Transaction History
{{-- Tabs --}}
{{-- Deposits panel --}}
@if($deposits->isEmpty())

No deposits on record.

@else
@foreach($deposits as $dep) @endforeach
# Amount Status Reference Date
{{ $dep->id }} {{ $dep->currency === 'USD' ? '$' : ($dep->currency === 'EUR' ? '€' : '') }}{{ number_format($dep->amount, 2) }} {{ $dep->currency }} @if($dep->credited_usd_amount !== null && $dep->currency !== 'USD')
USD {{ number_format($dep->credited_usd_amount, 2) }} credited
@endif
{{ ucfirst($dep->status) }} {{ $dep->reference ?? '—' }} {{ $dep->created_at->format('d M Y H:i') }}
@endif
{{-- Withdrawals panel --}}
@if($withdrawals->isEmpty())

No withdrawal requests yet.

@else
@foreach($withdrawals as $w) @endforeach
# Method Amount Status Date
{{ $w->id }} @if($w->method === 'crypto') Crypto @elseif($w->method === 'bank_transfer') Bank @elseif($w->method === 'credit_card') Card @else {{ ucfirst($w->method ?? 'N/A') }} @endif {{ $w->currency === 'USD' ? '$' : ($w->currency === 'EUR' ? '€' : '') }}{{ number_format($w->amount, 2) }} {{ $w->currency }} {{ ucfirst($w->status) }} {{ $w->created_at->format('d M Y H:i') }}
@endif
{{-- Trades panel --}}
@if($trades->isEmpty())

No trades on record.

@else
@foreach($trades as $trade) @endforeach
Symbol Side Qty Price Total Date
@if($trade->symbol)
{{ $trade->symbol->name }}
{{ $trade->symbol->tv_symbol }}
@else — @endif
{{ strtoupper($trade->side) }} {{ rtrim(rtrim(number_format($trade->quantity, 8), '0'), '.') }} {{ number_format($trade->price, 2) }} {{ number_format($trade->total_cost, 2) }} {{ $trade->traded_at->format('d M Y H:i') }}
@endif
@endsection @section('page-js') @endsection