@extends('portal.layouts.master') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('extra-css') /* ── KYC ticker bar ── */ .kyc-ticker { background: #1a1f2e; border-bottom: 1px solid #2d3548; padding: .42rem 1rem; font-size: .78rem; color: #a9b4cc; display: flex; align-items: center; gap: .5rem; margin: -.5rem -1.5rem .75rem; } .kyc-ticker a { color: #5b9cf6; text-decoration: none; font-weight: 600; } .kyc-ticker a:hover { text-decoration: underline; } .kyc-ticker .kyc-icon { color: #f59e0b; } /* ── Stat cards row ── */ .balance-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: .65rem; margin-bottom: 1rem; } @media (max-width: 1400px) { .balance-row { grid-template-columns: repeat(3, 1fr); } } @media (max-width: 768px) { .balance-row { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 480px) { .balance-row { grid-template-columns: 1fr; } } .balance-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: .85rem .9rem .6rem; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 115px; } .balance-card::before { content: ''; position: absolute; inset: 0; background: var(--bc-grad, transparent); pointer-events: none; border-radius: 10px; opacity: .18; } .balance-card--blue { --bc-grad: linear-gradient(135deg,#3b82f6,transparent 70%); } .balance-card--green { --bc-grad: linear-gradient(135deg,#0ecb81,transparent 70%); } .balance-card--cyan { --bc-grad: linear-gradient(135deg,#06b6d4,transparent 70%); } .balance-card--purple { --bc-grad: linear-gradient(135deg,#8b5cf6,transparent 70%); } .balance-card--red { --bc-grad: linear-gradient(135deg,#f6465d,transparent 70%); } .balance-card--amber { --bc-grad: linear-gradient(135deg,#f59e0b,transparent 70%); } .balance-card .bc-label { font-size: .62rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: .25rem; } .balance-card .bc-amount { font-size: 1.6rem; font-weight: 800; line-height: 1.05; color: var(--text-primary); letter-spacing: -.02em; margin-bottom: .08rem; } .balance-card .bc-sub { font-size: .62rem; color: var(--text-muted); margin-bottom: auto; } .balance-card.pnl-positive .bc-amount { color: #0ecb81; } .balance-card.pnl-negative .bc-amount { color: #f6465d; } .balance-card--red .bc-amount { color: #f6465d; } .balance-card--amber .bc-amount { color: #f59e0b; } .balance-card--cyan .bc-amount { color: #22d3ee; } .balance-card--purple .bc-amount { color: #a78bfa; } /* mini chart area */ .bc-chart { margin-top: .55rem; height: 38px; overflow: hidden; } .bc-chart svg { width: 100%; height: 100%; display: block; } /* win rate donut gauge */ .bc-gauge { display: flex; align-items: center; justify-content: center; flex: 1; padding: .25rem 0 .1rem; } .bc-gauge svg { width: 64px; height: 64px; } .bc-gauge-track { fill: none; stroke: rgba(139,92,246,.2); stroke-width: 7; } .bc-gauge-fill { fill: none; stroke: #8b5cf6; stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray .6s ease; } .bc-gauge-label { font-size: .9rem; font-weight: 800; fill: #a78bfa; } /* 3-column dashboard layout — fill the viewport */ .dash-grid { display: grid; grid-template-columns: minmax(280px, 1.15fr) minmax(0, 2.6fr) minmax(260px, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; width: 100%; } @media (max-width: 1400px) { .dash-grid { grid-template-columns: minmax(280px, 360px) 1fr minmax(240px, 280px); } } @media (max-width: 1200px) { .dash-grid { grid-template-columns: minmax(300px, 1fr) 1fr; } .dash-grid .signals-col { display: none; } } @media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } } /* Watchlist / Popular trades column */ .watchlist-col { min-width: 0; } .watchlist-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; max-height: 600px; width: 100%; } .watchlist-panel .panel-header { padding: .6rem .75rem; border-bottom: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: .5rem; } .watchlist-panel .panel-body { flex: 1; overflow-y: auto; padding: 0; } .watchlist-item { display: flex; align-items: center; gap: .35rem; padding: .45rem .4rem .45rem .55rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; text-decoration: none; color: var(--text-primary); } .watchlist-item:hover, .watchlist-item.active { background: rgba(59,130,246,.08); color: var(--text-primary); } .watchlist-item.active { border-left: 2px solid var(--accent); } .wl-item-inner { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-right: .15rem; } .wl-pair-left { display: flex; align-items: center; gap: .5rem; flex: 1 1 auto; min-width: 0; } .wl-pair-texts { min-width: 0; } .wl-pair-ticker { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Dashboard Popular Trades: show full pair (e.g. BTC/USDT) — no clipping */ .watchlist-panel .wl-pair-left { flex: 1 0 auto; min-width: 0; } .watchlist-panel .wl-pair-texts { min-width: 0; flex: 1 1 auto; } .watchlist-panel .wl-pair-ticker { font-size: .82rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; overflow: visible; text-overflow: clip; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } .watchlist-panel .wl-pair-name { white-space: normal; word-break: break-word; } .wl-pair-name { font-size: .62rem; color: var(--text-muted); line-height: 1.2; } .wl-pair-mid { flex-shrink: 0; min-width: 4.2rem; } .watchlist-panel .wl-pair-mid { min-width: 4.5rem; } .wl-pair-price { font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; } .wl-pair-pct { font-size: .64rem; font-weight: 500; } .wl-chg--up { color: var(--green); } .wl-chg--down { color: var(--red); } .wl-chg--flat, .wl-chg--muted { color: var(--text-muted); } .tabular-nums { font-variant-numeric: tabular-nums; } .pair-avatar-stack { position: relative; width: 40px; height: 30px; flex-shrink: 0; } .pair-avatar-stack--single { width: 32px; } .pair-avatar { position: absolute; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-card); box-shadow: 0 1px 2px rgba(0,0,0,.25); } .pair-avatar--base { left: 0; top: 1px; z-index: 2; } .pair-avatar--quote { left: 11px; top: 3px; z-index: 1; } .pair-avatar-stack--single .pair-avatar--base { left: 2px; } .pair-avatar-mono { font-size: .5rem; font-weight: 800; letter-spacing: -0.02em; } .wl-pair-actions { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; padding-right: .2rem; } .wl-pair-act { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); background: transparent; border: none; text-decoration: none; font-size: .75rem; transition: color .12s, background .12s; } .wl-pair-act:hover { color: var(--text-primary); background: rgba(255,255,255,.06); } /* legacy single icon (kept for other panels) */ .wl-left { display: flex; align-items: center; gap: .5rem; } .wl-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: .55rem; color: var(--text-secondary); font-weight: 700; letter-spacing: -.02em; flex-shrink: 0; } .wl-symbol { font-size: .78rem; font-weight: 600; } .wl-name { font-size: .65rem; color: var(--text-muted); } .wl-right { text-align: right; } .wl-price { font-size: .8rem; font-weight: 600; } .wl-change { font-size: .65rem; } /* Chart area */ .tv-chart-wrap { background: #131722; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); } /* Right panel with tabs */ .right-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; } .right-panel-tabs { display: flex; border-bottom: 1px solid var(--border); } .right-panel-tab { flex: 1; padding: .6rem .5rem; text-align: center; font-weight: 600; font-size: .78rem; cursor: pointer; border: none; background: transparent; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all .15s; text-transform: uppercase; letter-spacing: .04em; } .right-panel-tab:hover { color: var(--text-primary); } .right-panel-tab.rp-active { color: var(--accent); border-bottom-color: var(--accent); } .right-panel-content { display: none; overflow-y: auto; } .right-panel-content.rp-visible { display: block; } #rp-signals { max-height: 520px; } /* Trade tab styles — button style */ .dash-trade-tabs { display: flex; gap: .5rem; padding: .6rem .75rem; border-bottom: 1px solid var(--border); } .dash-trade-tab { flex: 1; padding: .45rem .5rem; text-align: center; font-weight: 700; font-size: .82rem; cursor: pointer; border: 2px solid transparent; border-radius: 6px; background: var(--bg-secondary); color: var(--text-secondary); transition: all .18s; letter-spacing: .02em; } .dash-trade-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); } .dash-trade-tab.dt-active-buy { background: rgba(14,203,129,.15); border-color: var(--green); color: var(--green); box-shadow: 0 0 0 1px rgba(14,203,129,.25); } .dash-trade-tab.dt-active-sell { background: rgba(246,70,93,.15); border-color: var(--red); color: var(--red); box-shadow: 0 0 0 1px rgba(246,70,93,.25); } .dash-trade-form { padding: .75rem; } .dash-trade-form .form-label { font-size: .75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; } .dash-trade-form .form-control { font-size: .85rem; padding: .5rem .65rem; } .dash-trade-summary { background: var(--bg-secondary); border-radius: 6px; padding: .6rem; margin-top: .6rem; } .dash-trade-summary-row { display: flex; justify-content: space-between; font-size: .78rem; padding: .15rem 0; } .dash-trade-summary-row .label { color: var(--text-secondary); } .dash-trade-summary-row .value { font-weight: 600; } /* Signals tab styles */ .signal-item { padding: .6rem .75rem; border-bottom: 1px solid var(--border); } .signal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .2rem; } .signal-pair { font-size: .78rem; font-weight: 600; } .signal-badge { font-size: .6rem; font-weight: 700; padding: .15rem .4rem; border-radius: 3px; text-transform: uppercase; } .signal-badge.buy { background: rgba(14,203,129,.15); color: var(--green); } .signal-badge.sell { background: rgba(246,70,93,.15); color: var(--red); } .signal-badge.strong-buy { background: rgba(14,203,129,.25); color: var(--green); } .signal-badge.strong-sell { background: rgba(246,70,93,.25); color: var(--red); } .signal-badge.neutral { background: rgba(255,255,255,.08); color: var(--text-secondary); } .signal-meta { font-size: .65rem; color: var(--text-muted); } .signal-prices { display: flex; gap: .75rem; margin-top: .25rem; font-size: .7rem; } .signal-prices span { color: var(--text-secondary); } .signal-prices strong { color: var(--text-primary); } /* Quick actions */ .quick-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; } .quick-actions .btn { padding: .5rem 1.25rem; font-size: .85rem; border-radius: 6px; } /* Symbol cell for tables */ .symbol-cell { display: flex; align-items: center; gap: .6rem; } .symbol-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; font-size: .7rem; color: var(--text-secondary); font-weight: 600; } .symbol-name { font-weight: 600; font-size: .85rem; } .symbol-ticker { font-size: .72rem; color: var(--text-muted); } @endsection @section('content') {{-- KYC ticker bar --}} @if(($kycStatus ?? 'not_submitted') !== 'approved')
| Instrument | QTY | AVG Entry | Current | Value | P&L | Action |
|---|---|---|---|---|---|---|
|
{{ $pos->symbol->name ?? '-' }}
{{ $pos->symbol->base_currency ?? '' }}
|
{{ rtrim(rtrim(number_format($pos->quantity, 8), '0'), '.') }} | {{ number_format($pos->avg_price, $pos->symbol->decimal_places ?? 2) }} | {{ $lp > 0 ? number_format($lp, $pos->symbol->decimal_places ?? 2) : '—' }} | {{ $lp > 0 ? '$' . number_format($val, 2) : '—' }} |
@if($lp > 0)
{{ ($pnl >= 0 ? '+' : '') . number_format($pnl, 2) }}
({{ ($pnlPct >= 0 ? '+' : '') . number_format($pnlPct, 2) }}%) @else — @endif |
Trade |