@php use App\Support\SymbolPresentation; @endphp @extends('portal.layouts.master') @section('title', 'Binary Options') @section('page-title', 'Binary Options') @section('extra-css') /* ══════════════════════════════════════════ BINARY OPTIONS — 3-column layout ══════════════════════════════════════════ */ .bo-shell { --bo-panel-height: clamp(640px, 72vh, 820px); display: grid; grid-template-columns: minmax(250px,300px) minmax(0,1fr) minmax(350px,380px); grid-template-rows: 58px calc(var(--bo-panel-height) - 58px) auto auto; column-gap: 1rem; row-gap: 0; min-height: 0; background: transparent; } /* ─── COLUMN 1: Category nav ─── */ .cat-col { width: 210px; flex-shrink: 0; background: #131722; border-right: 1px solid #2b3139; display: flex; flex-direction: column; overflow-y: auto; } .cat-col::-webkit-scrollbar { width: 3px; } .cat-col::-webkit-scrollbar-thumb { background: #2b3139; } .cat-top { padding: .9rem 1rem .6rem; border-bottom: 1px solid #2b3139; } .cat-top h6 { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #5e6673; margin: 0; } .cat-item { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; cursor: pointer; border-left: 3px solid transparent; border-bottom: 1px solid rgba(255,255,255,.03); transition: background .14s, border-color .14s; } .cat-item:hover { background: rgba(255,255,255,.04); } .cat-item.active { background: rgba(59,130,246,.1); border-left-color: #3b82f6; } .cat-item.active .cat-iname { color: #fff; } .cat-icon-wrap { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem; } .cat-icon-wrap.forex { background: rgba(14,203,129,.12); color: #0ecb81; } .cat-icon-wrap.crypto { background: rgba(245,158,11,.12); color: #f59e0b; } .cat-icon-wrap.stocks { background: rgba(59,130,246,.12); color: #3b82f6; } .cat-icon-wrap.commodities { background: rgba(139,92,246,.12); color: #8b5cf6; } .cat-iname { font-size: .85rem; font-weight: 700; color: #848e9c; } .cat-idesc { font-size: .65rem; color: #5e6673; margin-top: 1px; line-height: 1.3; } .cat-count { margin-left: auto; flex-shrink: 0; background: #1e2329; color: #848e9c; font-size: .62rem; font-weight: 700; padding: .15rem .4rem; border-radius: 4px; min-width: 20px; text-align: center; } .cat-item.active .cat-count { background: rgba(59,130,246,.2); color: #3b82f6; } /* ─── COLUMN 2: Asset list ─── */ .asset-col { width: auto; min-width: 0; grid-column: 1; grid-row: 1 / 3; height: var(--bo-panel-height); background: var(--bg-card, #131722); border: 1px solid var(--border, #2b3139); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; } .asset-filter-header { padding: .6rem .75rem; border-bottom: 1px solid var(--border, #2b3139); min-height: 51px; display: flex; align-items: center; } .asset-filter { position: relative; width: 100%; } .asset-filter-toggle { width: 100%; padding: 0; border: 0; background: transparent; color: var(--text-secondary, #848e9c); display: flex; align-items: center; gap: .55rem; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; font-weight: 700; cursor: pointer; text-align: left; } .asset-filter-toggle .filter-chevron { margin-left: auto; transition: transform .15s ease; } .asset-filter-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); } .asset-filter-menu { position: absolute; z-index: 50; top: calc(100% + .7rem); left: -.75rem; right: -.75rem; padding: .35rem; border: 1px solid var(--border, #2b3139); border-radius: 8px; background: var(--bg-card, #131722); box-shadow: 0 12px 30px rgba(0,0,0,.38); } .asset-filter-menu .cat-item { width: 100%; border: 0; border-radius: 6px; padding: .55rem .6rem; background: transparent; text-align: left; } .asset-filter-menu .cat-item.active, .asset-filter-menu .cat-item:hover, .asset-filter-menu .cat-item:focus { background: rgba(59,130,246,.1); outline: none; } .asset-search-bar { padding: .6rem .8rem; border-bottom: 1px solid #2b3139; flex-shrink: 0; position: relative; } .asset-search-bar input { width: 100%; background: #131722; border: 1px solid #2b3139; border-radius: 7px; padding: .45rem .7rem .45rem 2.1rem; color: #eaecef; font-size: .82rem; outline: none; transition: border-color .15s; font-family: inherit; } .asset-search-bar input:focus { border-color: #3b82f6; } .asset-search-bar .fa-magnifying-glass { position: absolute; left: 1.35rem; top: 50%; transform: translateY(-50%); color: #5e6673; font-size: .78rem; pointer-events: none; } .asset-list-hdr { display: grid; grid-template-columns: 1fr 60px 60px; padding: .35rem .85rem; border-bottom: 1px solid #2b3139; flex-shrink: 0; } .asset-list-hdr span { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #5e6673; } .asset-list-hdr span:not(:first-child) { text-align: center; } .asset-scroll { overflow-y: auto; flex: 1; } .asset-scroll::-webkit-scrollbar { width: 3px; } .asset-scroll::-webkit-scrollbar-thumb { background: #2b3139; } .asset-row { display: grid; grid-template-columns: 1fr 60px 60px; align-items: center; padding: .6rem .85rem; cursor: pointer; border-left: 3px solid transparent; border-bottom: 1px solid rgba(255,255,255,.03); transition: background .12s; } .asset-row:hover { background: rgba(255,255,255,.04); } .asset-row.active { background: rgba(59,130,246,.1); border-left-color: #3b82f6; } .ar-info { display: flex; align-items: center; gap: .6rem; min-width: 0; } .ar-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #1e2329; font-size: .7rem; font-weight: 800; } .ar-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; } .ar-icon.stock-icon { font-size: .92rem; } .ar-icon.stock-icon i { line-height: 1; } .ar-icon-fallback { display: none; font-size: .62rem; font-weight: 800; } .ar-icon.flags { position: relative; background: transparent; } .ar-icon.flags .f1, .ar-icon.flags .f2 { width: 22px; height: 22px; border-radius: 50%; position: absolute; overflow: hidden; border: 1px solid #0d1117; } .ar-icon.flags .f1 { top: 0; left: 0; z-index: 2; } .ar-icon.flags .f2 { bottom: 0; right: 0; z-index: 1; } .ar-icon.flags .f1 img, .ar-icon.flags .f2 img { width: 100%; height: 100%; object-fit: cover; } .ar-text { min-width: 0; } .ar-name { font-size: .82rem; font-weight: 600; color: #eaecef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ar-price { font-size: .68rem; color: #848e9c; margin-top: 1px; font-variant-numeric: tabular-nums; } .ar-pct { text-align: center; font-size: .78rem; font-weight: 700; color: #0ecb81; } .ar-pct.na { color: #5e6673; } /* ─── COLUMN 3: Chart + Trade form ─── */ .trade-col { display: contents; } .trade-hdr { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.1rem; border-bottom: 1px solid #2b3139; grid-column: 2; grid-row: 1; background: #131722; border: 1px solid var(--border, #2b3139); border-bottom: 0; border-radius: 8px 8px 0 0; } .th-left {} .th-asset { font-size: 1.05rem; font-weight: 700; color: #eaecef; } .th-sub { font-size: .7rem; color: #848e9c; margin-top: 1px; } .th-price-big { font-size: 1.5rem; font-weight: 800; color: #f0c96a; font-variant-numeric: tabular-nums; line-height: 1; text-align: right; } .th-chg { font-size: .75rem; font-weight: 700; text-align: right; margin-top: 2px; } .th-chg.up { color: #0ecb81; } .th-chg.dn { color: #f6465d; } /* Chart */ .chart-wrap { grid-column: 2; grid-row: 2; height: auto; min-height: 0; background: #0b0e11; border: 1px solid var(--border, #2b3139); border-top: 0; border-radius: 0 0 8px 8px; position: relative; display: flex; flex-direction: column; overflow: hidden; } .chart-wrap:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; background: #0b0e11; } .chart-toolbar { min-height: 42px; display: flex; align-items: center; gap: .3rem; padding: .35rem .45rem; overflow-x: auto; flex: 0 0 auto; border-bottom: 1px solid #252b34; background: #10141c; scrollbar-width: thin; } .chart-toolbar-group { display: inline-flex; align-items: center; gap: .18rem; padding-right: .35rem; border-right: 1px solid #2b3139; } .chart-toolbar-group:last-child { border: 0; } .chart-tool { min-width: 31px; height: 30px; padding: 0 .48rem; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #a8b0bc; font-size: .68rem; font-weight: 700; cursor: pointer; white-space: nowrap; } .chart-tool:hover { color: #fff; background: #202630; } .chart-tool.active { color: #fff; background: #323946; border-color: #4b5563; } .chart-tool.danger:hover { color: #ff6b7d; } .chart-tool-select { height: 30px; padding: 0 1.45rem 0 .45rem; border: 1px solid #303743; border-radius: 5px; background: #151a23; color: #d5dae1; font-size: .68rem; cursor: pointer; } .binary-range-label, .binary-timeframe-label { display:inline-flex; align-items:center; height:30px; color:#a8b0bc; font-size:.68rem; font-weight:700; line-height:1; padding:0 .15rem; white-space:nowrap; } .chart-indicator-menu { position: absolute; z-index: 40; top: 45px; left: 315px; width: 238px; padding: .55rem; border: 1px solid #303743; border-radius: 7px; background: #161b24; box-shadow: 0 12px 30px rgba(0,0,0,.45); } .chart-indicator-menu[hidden] { display: none; } .indicator-option { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem; color: #d5dae1; font-size: .7rem; } .indicator-option input { accent-color: #3b82f6; } .indicator-option .indicator-settings { display: flex; gap: .2rem; } .indicator-option input[type="number"] { width: 42px; padding: .12rem .18rem; color: #fff; background: #0b0e11; border: 1px solid #303743; border-radius: 3px; font-size: .62rem; } .chart-stage { position: relative; min-height: 0; flex: 1 1 auto; } .internal-chart-mount { position: absolute; inset: 0; } .chart-drawing-layer { position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%; pointer-events: none; } .chart-drawing-layer.drawing { pointer-events: auto; cursor: crosshair; } .chart-drawing-layer .drawing-hit { pointer-events: stroke; cursor: pointer; } .chart-drawing-layer .selected { filter: drop-shadow(0 0 3px #60a5fa); } .internal-chart-status { position: absolute; top: 2.3rem; left: .75rem; z-index: 3; display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .5rem; border-radius: 5px; background: rgba(11,14,17,.78); color: #848e9c; font-size: .65rem; font-weight: 700; letter-spacing: .03em; pointer-events: none; } .chart-ohlc { position: absolute; top: .42rem; left: .75rem; right: .75rem; z-index: 3; display: flex; align-items: center; gap: .42rem; color: #8f98a5; font-size: .65rem; pointer-events: none; white-space: nowrap; overflow: hidden; } .chart-ohlc strong { color: #e5e7eb; } .chart-ohlc .up { color: #0ecb81; } .chart-ohlc .down { color: #f6465d; } .chart-save-state { margin-left: auto; color: #64748b; font-size: .6rem; } .chart-attribution { color:#64748b; font-size:.58rem; text-decoration:none; white-space:nowrap; } .chart-attribution:hover { color:#94a3b8; } .chart-save-state.saved { color: #0ecb81; } .chart-save-state.error { color: #f59e0b; } .internal-chart-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #0ecb81; box-shadow: 0 0 0 3px rgba(14,203,129,.12); } /* Form scroll area */ .trade-form-wrap { grid-column: 3; grid-row: 1 / 3; height: var(--bo-panel-height); min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #0c1628; border: 1px solid #294467; border-radius: 12px; box-shadow: inset 0 0 30px rgba(20,93,180,.08), 0 10px 30px rgba(0,0,0,.18); } .trade-form-wrap::-webkit-scrollbar { width: 3px; } .trade-form-wrap::-webkit-scrollbar-thumb { background: #2b3139; } #boForm { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .75rem .9rem .9rem; display: flex; flex-direction: column; justify-content: space-between; gap: .45rem; } .bo-panel-tabs { display:flex; flex:0 0 auto; margin:.7rem .9rem 0; padding:.3rem; border:1px solid rgba(41,68,103,.7); border-radius:8px; background:#091426; } .bo-panel-tab { flex:1; padding:.48rem; border:0; border-radius:6px; background:transparent; color:#90a2bd; font-size:.72rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; cursor:pointer; } .bo-panel-tab.active { color:#fff; background:#0c2f65; box-shadow:inset 0 0 12px rgba(22,136,255,.18); } .bo-panel-view[hidden] { display:none !important; } .bo-signal-view { flex:1 1 auto; min-height:0; padding:.9rem; overflow-y:auto; } .bo-signal-card { height:100%; display:flex; flex-direction:column; justify-content:space-between; gap:1rem; padding:1rem; border:1px solid #294467; border-radius:10px; background:#07101e; } .bo-signal-title { color:#f4f7fb; font-size:1rem; font-weight:800; } .bo-signal-symbol { color:#7f94b3; font-size:.68rem; margin-top:.2rem; } .bo-signal-badge { align-self:flex-start; padding:.45rem .75rem; border-radius:5px; background:rgba(139,148,158,.12); color:#8b949e; font-size:.78rem; font-weight:800; text-transform:uppercase; } .bo-signal-badge.up { background:rgba(14,203,129,.14); color:#0ecb81; } .bo-signal-badge.down { background:rgba(246,70,93,.12); color:#f6465d; } .bo-signal-metrics { display:grid; gap:.65rem; } .bo-signal-line { display:flex; justify-content:space-between; gap:1rem; padding-bottom:.55rem; border-bottom:1px solid rgba(41,68,103,.55); color:#90a2bd; font-size:.76rem; } .bo-signal-line strong { color:#f4f7fb; text-align:right; } .bo-signal-note { color:#7185a2; font-size:.68rem; line-height:1.55; } } .bo-ticket-header { display: flex; align-items: center; gap: .65rem; padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid rgba(73,112,161,.35); } .bo-ticket-identity { display: flex; align-items: center; gap: .65rem; min-width: 0; } .bo-ticket-quote { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; } .bo-ticket-price { color: #1688ff; font-size: 1rem; font-weight: 900; line-height: 1.1; } .bo-ticket-change { color: #7f94b3; font-size: .62rem; font-weight: 700; margin-top: .2rem; } .bo-ticket-change.up { color: #0ecb81; } .bo-ticket-change.dn { color: #f6465d; } .bo-ticket-mark { width: 35px; height: 35px; flex: 0 0 35px; border: 2px solid #1688ff; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #10284c; box-shadow: 0 0 16px rgba(22,136,255,.26); font-size: .9rem; } .bo-ticket-title { color: #f4f7fb; font-size: .92rem; font-weight: 900; letter-spacing: .01em; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bo-ticket-title span { color: #1688ff; } .bo-ticket-subtitle { color: #7f94b3; font-size: .62rem; margin-top: .27rem; white-space: nowrap; } .bo-ticket-secure { color: #7185a2; font-size: .62rem; text-align: center; margin-top: .55rem; } .bo-ticket-secure i { color: #6384b0; margin-right: .3rem; } /* Direction */ .dir-row { display: flex !important; width: 100%; align-items: stretch; gap: .45rem; margin-bottom: .85rem; padding: .35rem; border: 1px solid rgba(41,68,103,.7); border-radius: 10px; background: #091426; } .dir-btn { flex: 1 1 0; width: 0; min-width: 0; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; justify-content: center; column-gap: .48rem; row-gap: .05rem; min-height: 66px; padding: .48rem .42rem; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: all .18s; font-family: inherit; background: rgba(255,255,255,.03); opacity: .48; } .dir-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.14rem; } .dir-btn.call { border-color: rgba(14,203,129,.3); color: #0ecb81; } .dir-btn.put { border-color: rgba(246,70,93,.3); color: #f6465d; } /* Selected — unmistakably highlighted */ .dir-btn.call.sel { background: #103d35; border-color: #0ecb81; box-shadow: 0 0 0 1px rgba(14,203,129,.22), inset 0 0 18px rgba(14,203,129,.18), 0 0 14px rgba(14,203,129,.16); opacity: 1; } .dir-btn.put.sel { background: #371b2b; border-color: #f6465d; box-shadow: 0 0 0 1px rgba(246,70,93,.2), inset 0 0 18px rgba(246,70,93,.14), 0 0 14px rgba(246,70,93,.12); opacity: 1; } .dir-btn.call:hover { opacity: .75; } .dir-btn.put:hover { opacity: .75; } .dir-btn.call.sel:hover, .dir-btn.put.sel:hover { opacity: 1; } .dir-btn i { font-size: 1.15rem; } .dir-btn b { font-size: .8rem; font-weight: 900; letter-spacing: .04em; text-align: left; } .dir-btn small { display: block; font-size: .56rem; color: #8798b2; text-align: left; white-space: nowrap; } .dir-btn .direction-price { grid-column: 1 / -1; font-size:.78rem; font-weight:800; color:#f4f7fb; text-align:center; } /* ─── Toast notification ─── */ .bo-toast { position: fixed; top: 80px; right: 20px; z-index: 99999; padding: .8rem 1.25rem 1rem; border-radius: 10px; font-size: .88rem; font-weight: 600; min-width: 280px; max-width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,.5); display: flex; align-items: flex-start; gap: .7rem; animation: boSlideIn .22s ease; line-height: 1.45; } .bo-toast.success { background: #0b2218; border: 1px solid #0ecb81; color: #0ecb81; } .bo-toast.error { background: #1f0a0d; border: 1px solid #f6465d; color: #f6465d; } .bo-toast-icon { font-size: 1.1rem; margin-top: .05rem; flex-shrink: 0; } .bo-toast-close { margin-left: auto; background: none; border: none; color: inherit; font-size: 1rem; cursor: pointer; opacity: .7; flex-shrink: 0; padding: 0; } @keyframes boSlideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } } /* Fields */ .row2 { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: .55rem; margin-bottom: .85rem; } .bo-field { margin-bottom: 0; } .bo-lbl { display: flex; align-items: center; gap: .3rem; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #90a2bd; margin-bottom: .38rem; } .bo-lbl .bo-info { color: #6384b0; font-size: .68rem; } .bo-control-wrap { position: relative; } .bo-control-icon { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); z-index: 2; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: #35d795; background: #0b4135; font-size: .72rem; pointer-events: none; } .bo-currency-flag { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); z-index: 2; width: 25px; height: 25px; border-radius: 50%; object-fit: cover; pointer-events: none; } .bo-input { width: 100%; background: #07101e; border: 1px solid #294467; color: #f4f7fb; border-radius: 8px; padding: .62rem .45rem .62rem 2.35rem; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit; } .bo-input:focus { border-color: #1688ff; box-shadow: 0 0 0 2px rgba(22,136,255,.16); } .bo-select { width: 100%; background: #07101e; border: 1px solid #294467; color: #f4f7fb; border-radius: 8px; padding: .65rem .35rem .65rem 2.35rem; font-size: .82rem; outline: none; cursor: pointer; font-family: inherit; } .bo-select option { background: #131722; } /* Expiry tabs */ .exp-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.35rem; width:100%; margin-bottom:.9rem; padding:.08rem 0; overflow-x:hidden; } .exp-tab { width:100%; min-width:0; min-height:38px; padding:.35rem .25rem; border-radius:6px; border: 1px solid #294467; background: #0b1b31; color: #90a2bd; cursor: pointer; transition: all .14s; font-family: inherit; display:flex; align-items:center; justify-content:center; gap:.2rem; } .exp-tab i { display:none; } .exp-tab .exp-value { color:#f4f7fb; font-size:.78rem; line-height:1; font-weight:700; } .exp-tab .exp-unit { display:none; } .exp-tab:hover { border-color: #1688ff; color: #eaecef; } .exp-tab.sel { background: #0c2f65; border-color: #1688ff; color: #fff; box-shadow: inset 0 0 16px rgba(22,136,255,.2), 0 0 10px rgba(22,136,255,.14); } .expiry-preview { border:1px solid #294467; border-radius:8px; padding:.55rem .7rem; margin:-.15rem 0 .85rem; background:#07101e; font-size:.72rem; } .expiry-preview-row { display:flex; justify-content:space-between; gap:.75rem; color:#90a2bd; line-height:1.55; } .expiry-preview-row strong { color:#f4f7fb; } /* Payout preview */ .pv-row { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: .85rem; } .pv-box { position: relative; padding: .62rem .35rem; min-height: 79px; border-radius: 8px; text-align: center; display: flex; flex-direction: column; justify-content: center; } .pv-box.w { background: #0b302a; border: 1px solid #126c51; } .pv-box.l { background: #301520; border: 1px solid #7b2637; } .pv-icon { position: absolute; top: .45rem; left: .5rem; font-size: .62rem; } .pv-box.w .pv-icon { color: #35d795; } .pv-box.l .pv-icon { color: #ff546d; } .pv-lbl { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .15rem; } .pv-box.w .pv-lbl { color: #0ecb81; } .pv-box.l .pv-lbl { color: #f6465d; } .pv-amt { font-size: 1.12rem; font-weight: 900; } .pv-box.w .pv-amt { color: #0ecb81; } .pv-box.l .pv-amt { color: #f6465d; } .pv-sub { font-size: .62rem; color: #5e6673; margin-top: 1px; } .payout-panel { border:1px solid #294467; border-radius:8px; padding:.58rem .7rem; margin-bottom:.85rem; background:#07101e; } .payout-line { display:flex; justify-content:space-between; gap:.75rem; color:#aab7c9; font-size:.76rem; line-height:1.65; } .payout-line strong { color:#f4f7fb; } .payout-line .positive { color:#0ecb81; } .payout-line .negative { color:#f6465d; } /* Place button */ .btn-place { display: block; width: 100%; padding: .72rem; background: linear-gradient(135deg,#1a6ef7,#3b9af6); color: #fff; border: 1px solid #32a1ff; border-radius: 8px; font-weight: 700; font-size: .92rem; cursor: pointer; transition: filter .15s, transform .12s; font-family: inherit; box-shadow: 0 0 14px rgba(22,136,255,.22); } .btn-place:disabled { opacity: .45; cursor: not-allowed; } .btn-place:not(:disabled):hover { filter: brightness(1.12); transform: translateY(-1px); } /* ─── Open positions ─── */ .pos-section { grid-column: 1 / -1; grid-row: 3; margin-top: 1rem; background: var(--bg-card, #131722); border: 1px solid var(--border, #2b3139); border-radius: 8px; padding: .9rem; } .sec-hdr { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #5e6673; margin-bottom: .55rem; display: flex; align-items: center; gap: .4rem; } .sec-cnt { background: #3b82f6; color: #fff; border-radius: 99px; font-size: .6rem; padding: .1rem .4rem; } .opts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: .55rem; } .opt-card { background: #131722; border: 1px solid #2b3139; border-radius: 8px; padding: .75rem .9rem; border-left: 3px solid transparent; } .opt-card.call { border-left-color: #0ecb81; } .opt-card.put { border-left-color: #f6465d; } .opt-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; } .od-badge { font-size: .6rem; font-weight: 800; padding: .15rem .45rem; border-radius: 4px; letter-spacing: .05em; } .od-badge.call { background: rgba(14,203,129,.14); color: #0ecb81; } .od-badge.put { background: rgba(246,70,93,.1); color: #f6465d; } .od-sym { font-size: .82rem; font-weight: 700; color: #eaecef; margin-left: .4rem; } .od-timer { font-size: .7rem; color: #848e9c; font-variant-numeric: tabular-nums; } .od-timer.finalising { color: #f0b90b; font-weight: 700; } .od-timer.delayed { color: #f59e0b; max-width: 190px; text-align: right; line-height: 1.25; } .opt-card.result-won { border-color: rgba(14,203,129,.7); background: rgba(14,203,129,.08); } .opt-card.result-lost { border-color: rgba(246,70,93,.7); background: rgba(246,70,93,.07); } .od-live { display:flex; align-items:center; justify-content:space-between; margin-top:.5rem; padding-top:.45rem; border-top:1px solid #2b3139; font-size:.75rem; } .od-live-price { color:#eaecef; font-weight:700; font-variant-numeric:tabular-nums; } .od-live-badge { font-size:.62rem; font-weight:800; padding:.12rem .42rem; border-radius:4px; letter-spacing:.04em; } .od-live-badge.itm { background:rgba(14,203,129,.14); color:#0ecb81; } .od-live-badge.otm { background:rgba(246,70,93,.1); color:#f6465d; } .od-live-badge.even { background:rgba(139,148,158,.12); color:#8b949e; } .kv3 { display: grid; grid-template-columns: repeat(3,1fr); gap: .35rem; } .kv label { font-size: .6rem; color: #5e6673; display: block; margin-bottom: 1px; } .kv span { font-size: .78rem; font-weight: 600; color: #eaecef; } .kv span.g { color: #0ecb81; } /* ─── History table ─── */ .hist-section { grid-column: 1 / -1; grid-row: 4; margin-top: 1rem; background: var(--bg-card, #131722); border: 1px solid var(--border, #2b3139); border-radius: 8px; padding: .9rem; } .dir-pill { font-size: .62rem; font-weight: 800; padding: .12rem .42rem; border-radius: 4px; } .dir-pill.call { background: rgba(14,203,129,.12); color: #0ecb81; } .dir-pill.put { background: rgba(246,70,93,.1); color: #f6465d; } .st-pill { font-size: .62rem; font-weight: 700; padding: .12rem .42rem; border-radius: 4px; } .st-pill.open { background: rgba(59,130,246,.12); color: #3b82f6; } .st-pill.won { background: rgba(14,203,129,.12); color: #0ecb81; } .st-pill.lost { background: rgba(246,70,93,.1); color: #f6465d; } .st-pill.push { background: rgba(139,148,158,.12); color: #8b949e; } .st-pill.cancelled { background: rgba(132,142,156,.1); color: #848e9c; } .st-pill.manually_settled { background: rgba(245,158,11,.12); color: #f59e0b; } /* ─── Live result dialog ─── */ .bo-result-backdrop { position: fixed; inset: 0; z-index: 1090; display: grid; place-items: center; padding: 1rem; background: rgba(3,7,18,.78); backdrop-filter: blur(4px); } .bo-result-backdrop[hidden] { display: none; } .bo-result-dialog { width: min(460px,100%); border-radius: 18px; border: 1px solid #2b3139; background: #131722; color: #eaecef; padding: 1.5rem; text-align: center; box-shadow: 0 28px 80px rgba(0,0,0,.55); position: relative; } .bo-result-dialog.won { border-color: rgba(14,203,129,.8); box-shadow: 0 28px 80px rgba(14,203,129,.16); } .bo-result-dialog.lost { border-color: rgba(246,70,93,.8); box-shadow: 0 28px 80px rgba(246,70,93,.14); } .bo-result-dialog.push { border-color: rgba(139,148,158,.6); box-shadow: 0 28px 80px rgba(139,148,158,.12); } .bo-result-close { position: absolute; top: .7rem; right: .8rem; border: 0; background: transparent; color: #848e9c; font-size: 1.5rem; line-height: 1; padding: .35rem; cursor: pointer; } .bo-result-icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .85rem; font-size: 1.75rem; } .won .bo-result-icon { color: #0ecb81; background: rgba(14,203,129,.14); } .lost .bo-result-icon { color: #f6465d; background: rgba(246,70,93,.13); } .push .bo-result-icon { color: #8b949e; background: rgba(139,148,158,.14); } .cancelled .bo-result-icon { color: #f59e0b; background: rgba(245,158,11,.13); } .bo-result-dialog h2 { margin: 0; font-size: 1.65rem; font-weight: 800; } .bo-result-sub { color: #848e9c; margin: .35rem 0 1rem; } .bo-result-amount { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; } .won .bo-result-amount { color: #0ecb81; } .lost .bo-result-amount { color: #f6465d; } .push .bo-result-amount { color: #8b949e; } .cancelled .bo-result-amount { color: #f59e0b; } .bo-result-details { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; text-align: left; margin-bottom: 1.1rem; } .bo-result-detail { border: 1px solid #2b3139; border-radius: 9px; padding: .65rem .75rem; } .bo-result-detail label { display: block; color: #5e6673; font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; } .bo-result-detail strong { display: block; margin-top: .2rem; font-size: .9rem; } .bo-result-done { width: 100%; border: 0; border-radius: 9px; padding: .75rem; color: #fff; font-weight: 800; cursor: pointer; } .won .bo-result-done { background: #0a9f68; } .lost .bo-result-done { background: #d9364e; } .push .bo-result-done { background: #4a5568; } .cancelled .bo-result-done { background: #b77909; } /* ─── Flash alerts ─── */ .bo-alert { position: fixed; top: 76px; right: 20px; z-index: 1080; border-radius: 8px; padding: .5rem .85rem; font-size: .82rem; } /* ─── Place button loading state ─── */ .btn-place.loading { opacity: .65; } /* ─── Responsive ─── */ @media (max-width: 1200px) { .bo-shell { grid-template-columns: minmax(240px,280px) minmax(0,1fr); grid-template-rows: 58px 632px auto auto auto; } .trade-form-wrap { grid-column: 1 / -1; grid-row: 3; height: auto; margin-top: 1rem; } #boForm { height: auto; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; } #boForm .bo-ticket-header, #boForm .dir-row, #boForm .btn-place, #boForm .bo-ticket-secure { grid-column: 1 / -1; } #boForm .row2, #boForm > .bo-field, #boForm .pv-row { margin-bottom: 0 !important; } .pos-section { grid-row: 4; } .hist-section { grid-row: 5; } } @media (max-width: 800px) { .bo-shell { display: grid; grid-template-columns: 1fr; grid-template-rows: 330px 58px 520px auto auto auto; } .asset-col { grid-column: 1; grid-row: 1; width: 100%; height: 330px; } .trade-hdr { grid-column: 1; grid-row: 2; } .chart-wrap { grid-column: 1; grid-row: 3; height: 520px; } .chart-indicator-menu { left: .5rem; right: .5rem; width: auto; } .trade-form-wrap { grid-column: 1; grid-row: 4; } #boForm { display: block; } #boForm .row2, #boForm > .bo-field, #boForm .pv-row { margin-bottom: .9rem !important; } .pos-section { grid-row: 5; } .hist-section { grid-row: 6; } } @endsection @section('content') @php /* ── Category meta ── */ $cats = [ 'forex' => ['label'=>'Forex', 'icon'=>'fa-arrow-right-arrow-left', 'cls'=>'forex', 'desc'=>'Currency pairs'], 'stocks' => ['label'=>'Stocks', 'icon'=>'fa-chart-line', 'cls'=>'stocks', 'desc'=>'Global equities'], 'crypto' => ['label'=>'Crypto', 'icon'=>'fa-bitcoin-sign', 'cls'=>'crypto', 'desc'=>'Cryptocurrencies'], 'commodities' => ['label'=>'Commodities', 'icon'=>'fa-coins', 'cls'=>'commodities', 'desc'=>'Metals, energy & indices'], ]; /* ── Currency → flag ISO code ── */ $flagCC = [ 'USD'=>'us','EUR'=>'eu','GBP'=>'gb','JPY'=>'jp','CHF'=>'ch', 'AUD'=>'au','CAD'=>'ca','NZD'=>'nz','SGD'=>'sg','HKD'=>'hk', 'NOK'=>'no','SEK'=>'se','DKK'=>'dk','PLN'=>'pl','CZK'=>'cz', ]; /* ── Crypto symbol → icon slug ── */ $cryptoSlug = [ 'Bitcoin'=>'btc','Ethereum'=>'eth','BNB'=>'bnb','Solana'=>'sol','XRP'=>'xrp', 'Cardano'=>'ada','Dogecoin'=>'doge','TRON'=>'trx','Toncoin'=>'ton', 'Polkadot'=>'dot','Polygon'=>'matic','Litecoin'=>'ltc','Chainlink'=>'link', 'Bitcoin Cash'=>'bch','Avalanche'=>'avax','Cosmos'=>'atom','Stellar'=>'xlm', 'Uniswap'=>'uni','Ethereum Classic'=>'etc','Aptos'=>'apt', ]; /* ── Commodity icon ── */ $commodityIcon = [ 'Gold'=>'fa-gem','Silver'=>'fa-gem','Platinum'=>'fa-gem','Palladium'=>'fa-gem', 'US Oil (WTI)'=>'fa-oil-well','UK Oil (Brent)'=>'fa-oil-well','Natural Gas'=>'fa-fire', 'Copper'=>'fa-plug','S&P 500'=>'fa-chart-bar','NASDAQ 100'=>'fa-chart-bar', 'Dow Jones'=>'fa-chart-bar','VIX'=>'fa-wave-square','US Dollar Index'=>'fa-dollar-sign', ]; /* ── Group symbols by category ── */ $grouped = $symbols->groupBy('category'); $firstCat = $selectedSymbol?->category ?? $grouped->keys()->first() ?? 'forex'; @endphp
{{-- ══ COLUMN 1: Binary Options asset dropdown + list ══ --}}
Asset Profit Payout
@foreach($symbols as $sym) @php $p = (float)($sym->latestPrice?->price ?? 0); $dec = $p < 10 ? 5 : ($p < 100 ? 3 : 2); $st = $settings->get($sym->id) ?? $defaultSetting; $pct = $st->payout_pct; $cat = $sym->category; /* Build icon HTML */ if ($cat === 'forex' && str_contains($sym->name, '/')) { [$base, $quote] = explode('/', $sym->name, 2); $cc1 = $flagCC[$base] ?? null; $cc2 = $flagCC[$quote] ?? null; $iconHtml = '
' . '
'.($cc1 ? ''.$base.'' : ''.substr($base,0,1).'').'
' . '
'.($cc2 ? ''.$quote.'' : ''.substr($quote,0,1).'').'
' . '
'; } elseif ($cat === 'crypto' && isset($cryptoSlug[$sym->name])) { $slug = $cryptoSlug[$sym->name]; $iconHtml = '
'.$sym->name.'
'; } elseif ($cat === 'stocks') { $ticker = preg_replace('/.*:/', '', $sym->tv_symbol ?? ''); [$stockIcon, $stockColor] = SymbolPresentation::baseIconPair($sym); if ($stockIcon && !str_starts_with($stockIcon, 'img:')) { $iconHtml = '
'; } elseif (str_starts_with($stockIcon, 'img:')) { $iconUrl = substr($stockIcon, 4); $iconHtml = '
' . e($sym->name) . '' . e(substr($ticker, 0, 3)) . '
'; } else { $iconHtml = '
' . e(substr($ticker,0,3)) . '
'; } } else { $faIcon = $commodityIcon[$sym->name] ?? 'fa-chart-line'; $iconHtml = '
'; } @endphp
{!! $iconHtml !!}
{{ $sym->name }}
{{ $p > 0 ? number_format($p, $dec) : '—' }}
{{ $pct }}%
{{ in_array('300', $st->available_expiries) ? $pct.'%' : '—' }}
@endforeach
{{-- ══ Dashboard flow: center chart + right CALL/PUT panel ══ --}}
{{-- Flash messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Trade header --}}
{{ $selectedSymbol?->name ?? 'Select an asset' }}
{{ $selectedSymbol?->tv_symbol ?? '' }}
@if($selectedSymbol?->latestPrice) @php $sp = (float)$selectedSymbol->latestPrice->price; @endphp {{ \App\Support\MarketPriceFormatter::format($sp) }} @else — @endif
@php $sc = (float)($selectedSymbol?->latestPrice?->change_24h_pct ?? 0); @endphp
{{ $sc >= 0 ? '+' : '' }}{{ number_format($sc, 2) }}%
{{-- Shared dashboard chart — uses the same component and Twelve Data quote stream --}}
{{-- Trade form --}}
@csrf
{{ $selectedSymbol?->name ?? 'Select an asset' }}
{{ $selectedSymbol?->tv_symbol ?? '' }}
@if($selectedSymbol?->latestPrice) {{ \App\Support\MarketPriceFormatter::format($sp) }} @else — @endif
{{ $sc >= 0 ? '+' : '' }}{{ number_format($sc, 2) }}%
{{-- Direction --}}
{{-- Stake + Currency --}}
USD ({{ number_format((float) ($wallets->firstWhere('currency', 'USD')?->balance ?? 0) + $creditBalance, 2) }})
{{-- Expiry tabs --}}
Expiry at—
Time remaining—
{{-- Payout preview --}}
Payout—
Profit if correct—
Total return—
Maximum loss—
Encrypted and secure
{{-- Open Positions --}}
count()) hidden @endif>
Open Positions {{ $openOptions->count() }}
Binary options cannot be closed before expiry. The position settles automatically at the displayed expiry time.
@foreach($openOptions as $opt) @php $od = (int)($opt->strike_price < 10 ? 5 : 2); @endphp
{{ strtoupper($opt->direction) }} {{ $opt->symbol->name }}
—
{{ $opt->currency }} {{ number_format($opt->stake,2) }}
{{ number_format($opt->strike_price,$od) }}
{{ $opt->currency }} {{ number_format($opt->potential_return,2) }}
— —
@endforeach
{{-- Trade History --}}
Trade History
@forelse($history as $opt) @php $hd = (int)($opt->strike_price < 10 ? 5 : 2); $clientResult = $opt->status === 'manually_settled' ? ((float) $opt->profit > 0 ? 'won' : 'lost') : $opt->status; @endphp @empty @endforelse
AssetDirStakeStrike CloseP&LResultDate
{{ $opt->symbol->name }} {{ strtoupper($opt->direction) }} {{ $opt->currency }} {{ number_format($opt->stake,2) }} {{ number_format($opt->strike_price,$hd) }} {{ $opt->close_price ? number_format($opt->close_price,$hd) : '—' }} @if($clientResult === 'won') +{{ $opt->currency }} {{ number_format($opt->profit??0,2) }} @elseif($clientResult === 'lost') -{{ $opt->currency }} {{ number_format($opt->stake,2) }} @elseif($clientResult === 'push') {{ $opt->currency }} 0.00 @else— @endif {{ ucfirst($clientResult) }} {{ $opt->created_at->format('d M y H:i') }}
No trade history yet.
{{-- /trade-col --}}
{{-- /bo-shell --}} @endsection @push('scripts') {{-- Lightweight chart driven by the authoritative internal price feed --}} @endpush