@extends('portal.layouts.master') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('extra-css') #legacyAssetTradeWidget { display:none; } .dashboard-position-summary-row td { padding:.7rem .85rem; border-top:1px solid var(--border); background:rgba(59,130,246,.045); } .dashboard-position-summary { display:flex; align-items:center; gap:1.25rem; flex-wrap:nowrap; white-space:nowrap; overflow-x:auto; font-size:.78rem; color:var(--text-secondary); } .dashboard-position-summary span { display:inline-flex; align-items:center; gap:.28rem; } .dashboard-position-summary strong { color:var(--text-muted); font-weight:500; } .dashboard-position-summary b { color:var(--text-primary); font-weight:600; font-variant-numeric:tabular-nums; } @media (max-width: 768px) { .dashboard-position-summary { gap:.85rem; } } /* ── 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(7, minmax(0, 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; } /* Dashboard trade confirmation dialog */ .dashboard-confirm-backdrop { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; background: rgba(2, 8, 23, .72); backdrop-filter: blur(5px); } .dashboard-confirm-backdrop[hidden] { display: none; } .dashboard-confirm-dialog { width: min(100%, 430px); overflow: hidden; border: 1px solid rgba(96,165,250,.38); border-radius: 16px; background: linear-gradient(145deg,#111c32,#0b1425); color: var(--text-primary); box-shadow: 0 24px 70px rgba(0,0,0,.5); } .dashboard-confirm-header { display:flex; align-items:center; gap:.75rem; padding:1.1rem 1.25rem; border-bottom:1px solid rgba(148,163,184,.16); } .dashboard-confirm-icon { display:grid; place-items:center; width:2.3rem; height:2.3rem; border-radius:50%; background:rgba(59,130,246,.16); color:#60a5fa; } .dashboard-confirm-title { margin:0; font-size:1.05rem; font-weight:700; } .dashboard-confirm-body { padding:1.15rem 1.25rem; color:var(--text-secondary); font-size:.9rem; line-height:1.5; } .dashboard-confirm-details { display:grid; grid-template-columns:1fr auto; gap:.45rem .75rem; margin-top:.9rem; padding:.8rem; border:1px solid rgba(148,163,184,.15); border-radius:10px; background:rgba(15,23,42,.55); } .dashboard-confirm-details strong { color:var(--text-primary); text-align:right; } .dashboard-confirm-footer { display:flex; justify-content:flex-end; gap:.65rem; padding:0 1.25rem 1.15rem; } .dashboard-confirm-footer button { min-width:7rem; border-radius:8px; padding:.62rem .9rem; font-weight:600; } .dashboard-confirm-cancel { border:1px solid rgba(148,163,184,.35); background:transparent; color:var(--text-secondary); } .dashboard-confirm-submit { border:1px solid #3b82f6; background:#2563eb; color:#fff; } .dashboard-confirm-submit.is-danger { border-color:#ef4444; background:#dc2626; } @media (max-width:480px) { .dashboard-confirm-footer { display:grid; grid-template-columns:1fr 1fr; } .dashboard-confirm-footer button { width:100%; } } /* 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 { --dashboard-panel-height: 560px; display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(350px, 380px); gap: 1rem; margin-bottom: 1rem; align-items: stretch; width: 100%; } @media (max-width: 1400px) { .dash-grid { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(320px, 350px); } } @media (max-width: 1200px) { .dash-grid { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); } .dash-grid .signals-col { display: none; } } @media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid .watchlist-panel { height: 360px; } .dash-grid .right-panel, .signals-col .right-panel { height: auto; } .dash-grid .tv-chart-wrap { height: 480px; } } /* 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; height: calc(var(--dashboard-panel-height) - 52px); 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-filter { position: relative; width: 100%; } .watchlist-filter-toggle { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: .5rem; text-transform: inherit; letter-spacing: inherit; font: inherit; cursor: pointer; text-align: left; } .watchlist-filter-toggle .filter-chevron { margin-left: auto; transition: transform .15s ease; } .watchlist-filter-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); } .watchlist-filter-menu { position: absolute; z-index: 30; top: calc(100% + .65rem); left: -.75rem; right: -.75rem; padding: .35rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); box-shadow: 0 12px 30px rgba(0,0,0,.3); } .watchlist-filter-option { width: 100%; border: 0; border-radius: 6px; padding: .55rem .6rem; background: transparent; color: var(--text-secondary); display: flex; align-items: center; gap: .55rem; font-size: .78rem; font-weight: 600; text-align: left; cursor: pointer; } .watchlist-filter-option:hover, .watchlist-filter-option:focus, .watchlist-filter-option[aria-selected="true"] { background: rgba(59,130,246,.1); color: var(--text-primary); outline: none; } .watchlist-empty { padding: 2rem 1rem; color: var(--text-muted); text-align: center; font-size: .78rem; } .watchlist-panel .panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0; } .watchlist-panel .panel-body::-webkit-scrollbar { width: 5px; } .watchlist-panel .panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; } .watchlist-panel .panel-body { scrollbar-width: thin; scrollbar-color: var(--border) transparent; } .watchlist-item { display: flex; align-items: center; gap: .35rem; padding: .36rem .4rem .36rem .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 */ .chart-col { min-width: 0; } .tv-chart-wrap { height: var(--dashboard-panel-height); background: #131722; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); position: relative; } .dashboard-timeframe-label { display:inline-flex; align-items:center; height:31px; color:#a8b0bc; font-size:11px; font-weight:700; line-height:1; padding:0 3px 0 2px; white-space:nowrap; } /* Right panel with tabs */ .right-panel { background: #0c1628; border: 1px solid #294467; border-radius: 12px; display: flex; flex-direction: column; height: var(--dashboard-panel-height); overflow: hidden; box-shadow: inset 0 0 30px rgba(20,93,180,.08), 0 10px 30px rgba(0,0,0,.18); } /* Match the chart and Popular Trades column exactly on desktop. */ .signals-col .right-panel { height: var(--dashboard-panel-height); min-height: 0; align-self: stretch; } @media (max-width: 768px) { .signals-col .right-panel { height: auto; } } .right-panel-tabs { display: flex; padding: .35rem; margin: .55rem .75rem 0; border: 1px solid rgba(41,68,103,.7); border-radius: 8px; background: #091426; } .right-panel-tab { flex: 1; padding: .42rem .5rem; text-align: center; font-weight: 800; font-size: .68rem; cursor: pointer; border: none; background: transparent; color: var(--text-secondary); border-radius: 6px; transition: all .15s; text-transform: uppercase; letter-spacing: .07em; } .right-panel-tab:hover { color: var(--text-primary); } .right-panel-tab.rp-active { color: #fff; background: #0c2f65; box-shadow: inset 0 0 12px rgba(22,136,255,.18); } .right-panel-content { display: none; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #294467 transparent; } .right-panel-content::-webkit-scrollbar { width: 4px; } .right-panel-content::-webkit-scrollbar-thumb { background: #294467; border-radius: 8px; } .right-panel-content.rp-visible { display: block; flex: 1; min-height: 0; } .signals-col .right-panel-content.rp-visible { flex: 1 1 auto; min-height: 0; } #rp-signals { max-height: 520px; } /* One unified trade workspace: use the full panel height without nested boxes. */ #rp-trade.rp-visible { position: relative; display: flex; flex-direction: column; gap: .55rem; padding: .55rem .8rem 5.625rem; overflow-y: auto; } #rp-trade.rp-visible.is-asset-mode { padding-bottom: .75rem; } #rp-trade .dashboard-ticket-header { flex: 0 0 auto; margin: 0; padding: .35rem 0 .7rem; border-bottom: 0; } #rp-trade .dashboard-trade-mode-switch { flex: 0 0 50px; width: 100%; margin: 0; padding-bottom: .7rem; border-bottom: 1px solid rgba(73,112,161,.35); } #rp-trade .dashboard-trade-mode-switch, #rp-trade .dashboard-leveraged-widget form > .btn-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; } #rp-trade .dashboard-trade-mode-switch > .btn, #rp-trade .dashboard-leveraged-widget form > .btn-group > .btn { width: 100%; height: 38px; margin-left: 0 !important; border-radius: 6px !important; } #rp-trade .dashboard-leveraged-widget { flex: 1 1 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; } #rp-trade .dashboard-leveraged-widget form { height: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; } #rp-trade .dashboard-leveraged-widget .row { flex: 0 0 auto; } #rp-trade .dashboard-leveraged-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; row-gap: .4rem; width: 100%; color: var(--text-muted); font-size: .72rem; } #rp-trade .dashboard-leveraged-stats > div { min-width: 0; text-align: left; white-space: nowrap; } #rp-trade .dashboard-side-grid { position: absolute; z-index: 2; left: .8rem; right: .8rem; bottom: .7rem; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; } #rp-trade .dashboard-side-button { min-height: 70px; } #rp-trade #legacyAssetTradeWidget { flex: 1 1 auto; min-height: 0; } #rp-trade #legacyAssetTradeWidget .dash-trade-form { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 0; } @media (max-width: 768px) { #rp-trade.rp-visible { padding-bottom: .75rem; overflow: visible; } #rp-trade .dashboard-side-grid { position: static; width: 100%; margin-top: .65rem; } #rp-trade .dashboard-leveraged-widget form, #rp-trade #legacyAssetTradeWidget .dash-trade-form { height: auto; gap: .65rem; } } .dashboard-ticket-header { display: flex; align-items: center; gap: .7rem; margin: .2rem .8rem 0; padding: .8rem 0; border-bottom: 1px solid rgba(73,112,161,.35); } .dashboard-ticket-icon { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px; display: grid; place-items: center; font-size: 1rem; border: 2px solid #1688ff; background: #10284c; box-shadow: 0 0 16px rgba(22,136,255,.26); } .dashboard-ticket-copy { flex: 1; min-width: 0; } .dashboard-ticket-name { color: #f4f7fb; font-size: .9rem; font-weight: 900; line-height: 1.1; } .dashboard-ticket-meta { color: #7f94b3; font-size: .62rem; margin-top: .2rem; text-transform: capitalize; } .dashboard-ticket-quote { flex: 0 0 auto; text-align: right; } .dashboard-ticket-price { color: #1688ff; font-size: 1rem; font-weight: 900; font-variant-numeric: tabular-nums; } .dashboard-ticket-freshness { display: block; margin-top: .12rem; color: #7f94b3; font-size: .55rem; font-weight: 700; } .dashboard-ticket-freshness.is-live { color: #0ecb81; } .dashboard-ticket-freshness.is-delayed { color: #f59e0b; } .dashboard-ticket-freshness.is-unavailable { color: #f6465d; } .dashboard-side-grid { display: flex; gap: .45rem; margin: .7rem .8rem .15rem; padding: .35rem; border: 1px solid rgba(41,68,103,.7); border-radius: 10px; background: #091426; } .dashboard-side-button { flex: 1 1 0; min-width: 0; min-height: 60px; padding: .45rem; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; justify-content: center; column-gap: .5rem; border: 2px solid transparent; border-radius: 8px; background: rgba(255,255,255,.03); font-family: inherit; cursor: pointer; opacity: .48; transition: all .18s; } .dashboard-side-button i { grid-row: 1 / 3; font-size: 1.05rem; } .dashboard-side-button strong { font-size: .78rem; font-weight: 900; letter-spacing: .05em; text-align: left; } .dashboard-side-button small { font-size: .53rem; color: #8798b2; white-space: nowrap; text-align: left; } .dashboard-side-button.buy { color: #0ecb81; border-color: rgba(14,203,129,.3); } .dashboard-side-button.sell { color: #f6465d; border-color: rgba(246,70,93,.3); } .dashboard-side-button.is-active.buy { opacity: 1; background: #103d35; border-color: #0ecb81; box-shadow: inset 0 0 18px rgba(14,203,129,.18), 0 0 14px rgba(14,203,129,.16); } .dashboard-side-button.is-active.sell { opacity: 1; background: #371b2b; border-color: #f6465d; box-shadow: inset 0 0 18px rgba(246,70,93,.14), 0 0 14px rgba(246,70,93,.12); } /* Trading-mode and input-mode selectors share the same unified dimensions. */ .dashboard-trade-mode-switch { width: 100%; margin: 0; } .dashboard-trade-mode-switch > .btn { flex: 1 1 50%; } /* 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: .65rem .8rem .8rem; } .dash-trade-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .55rem; } .dash-trade-fields > .mb-2 { min-width: 0; margin-bottom: 0 !important; } .dash-quantity-row { display:flex; gap:.4rem; } .dash-quantity-row .form-control { min-width:0; } .dash-max-button { border:1px solid var(--border); border-radius:6px; padding:0 .65rem; background:var(--bg-tertiary); color:var(--accent); font-size:.7rem; font-weight:800; } .dash-max-button:disabled { cursor:not-allowed; opacity:.45; } .dash-position-hint { min-height:1rem; margin-top:.2rem; color:var(--text-muted); font-size:.65rem; } .dash-position-hint.is-error { color:var(--red); } .dash-trade-form .form-label { font-size: .62rem; font-weight: 800; color: #90a2bd; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; } .dash-trade-form .form-control { font-size: .8rem; padding: .55rem .65rem; color: #f4f7fb; background: #07101e; border: 1px solid #294467; border-radius: 8px; box-shadow: none; } .dash-trade-form .form-control:focus { border-color: #1688ff; box-shadow: 0 0 0 2px rgba(22,136,255,.16); } .dash-trade-form .form-control:disabled { color: #90a2bd; background: #091426; opacity: 1; } .dashboard-label-info { color: #6384b0; font-size: .68rem; margin-left: .18rem; } .dashboard-currency-control { position: relative; } .dashboard-currency-flag { position: absolute; z-index: 2; left: .55rem; top: 50%; transform: translateY(-50%); width: 27px; height: 27px; border-radius: 50%; object-fit: cover; pointer-events: none; } .dashboard-currency-control .form-control { padding-left: 2.65rem; } .dash-trade-summary { background: #091426; border: 1px solid rgba(41,68,103,.7); border-radius: 8px; padding: .55rem .65rem; 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; } .dash-trade-submit { display: block; width: 100%; padding: .7rem !important; margin-top: .55rem; border: 1px solid #32a1ff !important; border-radius: 8px !important; background: linear-gradient(135deg,#1a6ef7,#3b9af6) !important; color: #fff !important; font-size: .88rem !important; font-weight: 800 !important; box-shadow: 0 0 14px rgba(22,136,255,.22); transition: filter .15s, transform .12s; } .dash-trade-submit.is-sell { border-color: #f6465d !important; background: linear-gradient(135deg,#a92239,#f6465d) !important; box-shadow: 0 0 14px rgba(246,70,93,.18); } .dash-trade-submit:hover { filter: brightness(1.1); transform: translateY(-1px); } @media (max-width: 768px) { .dash-trade-fields { grid-template-columns: 1fr; } } /* 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; } .watchlist-col .quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .75rem 0 0; } .watchlist-col .quick-actions .btn { width: 100%; padding: .5rem .35rem; white-space: nowrap; } /* 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')
KYC Verification Required — Your account is not fully verified. Upload documents to unlock full access.
@endif {{-- Stat cards --}} @php $pnlClass = $totalPnl > 0 ? 'pnl-positive' : ($totalPnl < 0 ? 'pnl-negative' : ''); $pnlSign = $totalPnl > 0 ? '+' : ''; $currencySymbols = ['USD' => '$', 'EUR' => '€', 'CAD' => 'CA$', 'AUD' => 'A$']; $mainSymbol = $currencySymbols[$mainCurrency] ?? ''; $winRateVal = min(100, max(0, $winRate)); $gaugeCircum = 2 * M_PI * 24; // r=24 $gaugeDash = $gaugeCircum * ($winRateVal / 100); @endphp
{{-- 1. USD Balance --}}
{{ $mainCurrency }} Cash Balance
{{ $mainSymbol }}{{ number_format($mainBalance, 2) }}
Cash wallet · Available {{ $mainSymbol }}{{ number_format($totalAvailable, 2) }}
{{-- 2. Non-withdrawable trading credit --}}
USD Credit
${{ number_format($creditBalance, 2) }}
Trading only · Not withdrawable
{{-- 2. P&L --}}
P&L
{{ $pnlSign }}{{ number_format($totalPnl, 2) }}
{{ $positions->count() > 0 ? 'Unrealized · Open Positions' : 'No Open Positions' }}
@php $bars = [6,10,8,14,10,18,12,22,16,24,18,28,22,32,26,28,30,26,28,34]; @endphp @foreach($bars as $bi => $bh) @endforeach
{{-- 3. Exchange rate --}}
{{ $exchangePair }}
@if($exchangeRate !== null)
{{ number_format($exchangeRate, 4) }}
@else
—
@endif
{{ $exchangeRate !== null ? 'Live rate' : 'Loading…' }}
{{-- 4. Win Rate --}}
Win Rate
{{ $winRate }}%
Trading Performance
{{ round($winRate) }}%
{{-- 5. Max Drawdown --}}
Max Drawdown
{{ $maxDrawdown > 0 ? '-' : '' }}{{ $maxDrawdown }}%
Risk Metric
{{-- 6. Margin Level --}}
Margin Level
@if($marginLevel !== null)
{{ number_format($marginLevel, 0) }}%
Equity / Position Value
@else
N/A
No open positions
@endif
{{-- 3-column: Watchlist | Chart | Signals --}}
{{-- Popular trades / Watchlist --}}
@php $popularIds = $popularSymbols->pluck('id')->all(); @endphp @foreach($dashboardSymbols as $idx => $sym) @php $tvSym = $sym->tv_symbol ?? 'BITSTAMP:BTCUSD'; $isPopular = in_array($sym->id, $popularIds, true); @endphp @endforeach
{{-- Main Twelve Data chart --}}
{{-- Right column: Trade + Signals tabs --}}
{{-- Trade Tab --}}
@php $firstSymbol = $popularSymbols->first(); $firstPrice = $firstSymbol?->latestPrice?->price ?? 0; $dashIconMap = [ 'Bitcoin'=>['fab fa-bitcoin','#f7931a'],'Ethereum'=>['fab fa-ethereum','#627eea'],'BNB'=>['fas fa-coins','#f3ba2f'], 'Solana'=>['fas fa-sun','#9945ff'],'XRP'=>['fas fa-circle-nodes','#00aae4'],'Cardano'=>['fas fa-cube','#0033ad'], 'Dogecoin'=>['fas fa-dog','#c2a633'],'TRON'=>['fas fa-diamond','#eb0029'],'Toncoin'=>['fas fa-gem','#0098ea'], 'Polkadot'=>['fas fa-circle-dot','#e6007a'],'Avalanche'=>['fas fa-mountain','#e84142'],'Polygon'=>['fas fa-draw-polygon','#8247e5'], 'Chainlink'=>['fas fa-link','#2a5ada'],'Litecoin'=>['fas fa-litecoin-sign','#bfbbbb'],'Bitcoin Cash'=>['fab fa-bitcoin','#8dc351'], 'Uniswap'=>['fas fa-horse-head','#ff007a'],'Cosmos'=>['fas fa-atom','#2e3148'],'Ethereum Classic'=>['fab fa-ethereum','#328332'], 'Stellar'=>['fas fa-star','#14b6e7'],'Aptos'=>['fas fa-a','#4cd7c6'], 'Apple'=>['fab fa-apple','#a2aaad'],'Microsoft'=>['fab fa-microsoft','#00a4ef'],'NVIDIA'=>['fas fa-microchip','#76b900'], 'Amazon'=>['fab fa-amazon','#ff9900'],'Alphabet'=>['fab fa-google','#4285f4'],'Meta Platforms'=>['fab fa-meta','#0081fb'], 'Tesla'=>['fas fa-car','#cc0000'],'Broadcom'=>['fas fa-server','#cc092f'],'Costco'=>['fas fa-cart-shopping','#e31837'], 'Adobe'=>['fas fa-wand-magic-sparkles','#ff0000'],'AMD'=>['fas fa-microchip','#ed1c24'],'Intel'=>['fas fa-microchip','#0071c5'], 'Qualcomm'=>['fas fa-mobile-screen','#3253dc'],'PayPal'=>['fab fa-paypal','#003087'],'Cisco'=>['fas fa-network-wired','#049fd9'], 'Gold'=>['fas fa-coins','#ffd700'],'Silver'=>['fas fa-coins','#c0c0c0'],'US Oil (WTI)'=>['fas fa-oil-well','#2d2d2d'], 'UK Oil (Brent)'=>['fas fa-oil-well','#1a3c5e'],'Copper'=>['fas fa-ring','#b87333'],'Natural Gas'=>['fas fa-fire-flame-simple','#ff6b35'], 'Platinum'=>['fas fa-gem','#e5e4e2'],'Palladium'=>['fas fa-gem','#ced0dd'],'S&P 500'=>['fas fa-chart-line','#ef4135'], 'NASDAQ 100'=>['fas fa-chart-line','#0096d6'],'Dow Jones'=>['fas fa-chart-line','#002868'],'VIX'=>['fas fa-chart-bar','#f26522'], 'US Dollar Index'=>['fas fa-dollar-sign','#85bb65'], ]; $dashForexIcons = [ 'EUR'=>['fas fa-euro-sign','#003399'],'USD'=>['fas fa-dollar-sign','#85bb65'],'GBP'=>['fas fa-sterling-sign','#1d3461'], 'JPY'=>['fas fa-yen-sign','#bc002d'],'CHF'=>['fas fa-franc-sign','#d52b1e'],'AUD'=>['fas fa-dollar-sign','#00843d'], 'CAD'=>['fas fa-dollar-sign','#ff0000'],'NZD'=>['fas fa-dollar-sign','#00247d'], ]; $firstIcon = $dashIconMap[$firstSymbol->name ?? ''] ?? null; $firstIconColor = '#6b7280'; if ($firstIcon) { [$firstIcon, $firstIconColor] = $firstIcon; } elseif (($firstSymbol->category ?? '') === 'forex' && isset($dashForexIcons[$firstSymbol->base_currency ?? ''])) { [$firstIcon, $firstIconColor] = $dashForexIcons[$firstSymbol->base_currency]; } @endphp {{-- Symbol header --}}
@if($firstIcon) @else {{ strtoupper(substr($firstSymbol->name ?? 'BTC', 0, 2)) }} @endif
{{ $firstSymbol->name ?? 'Bitcoin' }}
{{ ucfirst($firstSymbol->category ?? 'crypto') }} market order
{{ \App\Support\MarketPriceFormatter::format($firstPrice) }}
Updating…
@csrf
USD
Entry price —
Position value USD 10.00
Units —
Contract size 1 unit
Margin USD 10.00
Free margin USD 0.00
Leverage 1×
Spread —
{{-- Shared Buy / Sell buttons --}}
{{-- Asset Trading form --}}
@csrf
@php $dashboardWalletFlag = ['USD'=>'us','EUR'=>'eu','CAD'=>'ca','AUD'=>'au'][$wallets->first()?->currency ?? 'USD'] ?? 'us'; @endphp
Executes at market price
Order Type Market Buy
Est. Total $0.00
Balance $0.00
{{-- Signals Tab --}}
@php $signalSymbols = [ ['symbol' => 'BITSTAMP:BTCUSD', 'name' => 'BTC/USD', 'cat' => 'Crypto'], ['symbol' => 'BITSTAMP:ETHUSD', 'name' => 'ETH/USD', 'cat' => 'Crypto'], ['symbol' => 'FX:EURUSD', 'name' => 'EUR/USD', 'cat' => 'Forex'], ['symbol' => 'FX:GBPUSD', 'name' => 'GBP/USD', 'cat' => 'Forex'], ['symbol' => 'NASDAQ:AAPL', 'name' => 'Apple', 'cat' => 'Stock'], ['symbol' => 'NASDAQ:TSLA', 'name' => 'Tesla', 'cat' => 'Stock'], ['symbol' => 'NASDAQ:AMZN', 'name' => 'Amazon', 'cat' => 'Stock'], ['symbol' => 'FX:USDJPY', 'name' => 'USD/JPY', 'cat' => 'Forex'], ['symbol' => 'BINANCE:SOLUSDT', 'name' => 'SOL/USDT', 'cat' => 'Crypto'], ['symbol' => 'COMEX:GC1!', 'name' => 'Gold', 'cat' => 'Commodity'], ]; @endphp @foreach($signalSymbols as $sig)
{{ $sig['name'] }} Loading...
{{ $sig['cat'] }} · --
TP: --
SL: --
Entry: --
@endforeach
{{-- Two-column: Positions + Recent --}}
{{-- Open Positions --}}
Open Positions View All
@include('portal.partials.dashboard-open-positions', ['positions' => $positions, 'leveragedOpen' => $leveragedOpen, 'summary' => $summary])
{{-- Legacy inline table retained only inside a Blade comment for compatibility with cached views. --}} {{-- @if($positions->isEmpty() && $leveragedOpen->isEmpty())
No open positions. Browse markets to start trading.
@else
@foreach($positions as $pos) @php $lp = (float)($pos->symbol?->latestPrice?->price ?? 0); $val = $pos->quantity * $lp; $pnl = ($lp - $pos->avg_price) * $pos->quantity; $pnlPct = $pos->avg_price > 0 ? (($lp - $pos->avg_price) / $pos->avg_price) * 100 : 0; @endphp @endforeach @foreach($leveragedOpen as $position) @php $leveragedCurrent = (float) ($position->symbol?->latestPrice?->price ?? 0); $leveragedPnl = $leveragedCurrent > 0 ? app(\App\Services\LeveragedTradingService::class)->pnl($position, $leveragedCurrent) : 0; $leveragedUnits = $position->entry_price > 0 ? $position->exposure / $position->entry_price : 0; $leveragedDecimals = $position->symbol->decimal_places ?? 2; @endphp @endforeach
Type Instrument Direction QTY / UNITS Entry Current Value P&L Protection Action
Asset
@include('portal.partials.symbol-icon', ['symbol' => $pos->symbol])
{{ $pos->symbol->name ?? '-' }}
{{ $pos->symbol?->display_symbol ?? '—' }}
LONG {{ 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
Leveraged
@include('portal.partials.symbol-icon', ['symbol' => $position->symbol])
{{ $position->symbol->name ?? '-' }}
{{ $position->symbol?->display_symbol ?? '—' }}
{{ strtoupper($position->direction) }} {{ $position->leverage }}× {{ rtrim(rtrim(number_format($leveragedUnits, 8), '0'), '.') }} {{ number_format($position->entry_price, $leveragedDecimals) }} {{ $leveragedCurrent > 0 ? number_format($leveragedCurrent, $leveragedDecimals) : '—' }} USD {{ number_format($position->exposure, 2) }} USD {{ number_format($leveragedPnl, 2) }}
@endif --}}
{{-- Right column --}}
{{-- Recent Trades --}}
Recent Trades All
@forelse($recentTrades as $t)
{{ strtoupper(substr($t->symbol->name ?? 'T', 0, 3)) }}
{{ $t->symbol->name ?? '-' }}
{{ $t->traded_at->format('M d, H:i') }}
{{ number_format($t->total_cost, 2) }}
{{ strtoupper($t->side) }}
@empty
No recent trades.
@endforelse
{{-- Recent Deposits --}}
Recent Deposits All
@forelse($recentDeposits as $dep)
{{ 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
{{ $dep->created_at->format('M d, Y') }}
{{ ucfirst($dep->status) }}
@empty
No deposits yet.
@endforelse
{{-- Credit Activity --}}
Credit ActivityUSD {{ number_format($creditBalance, 2) }} available
@forelse($recentCredits as $credit)
{{ ucfirst($credit->action) }} {{ number_format($credit->amount, 2) }} USD
{{ $credit->created_at->format('M d, Y') }}
Balance {{ number_format($credit->balance_after, 2) }}
@empty
No credit activity yet.
@endforelse
@endsection @push('scripts') @endpush @section('page-js') @endsection