e.stopPropagation()} style={{ width: '100%', background: theme.bgElevated, borderTopLeftRadius: 24, borderTopRightRadius: 24, padding: '12px 16px 28px', borderTop: `0.5px solid ${theme.border}`, animation: 'slideUp 280ms cubic-bezier(0.2,0.9,0.3,1.05)' }}>
{posPair(order.sym)}
{t('order.type.' + order.typeCode)} {order.vol.toFixed(2)}
#{order.ticket} · {order.created}
{/* Status is a CODE (FR4) — rendered from the code and uppercased by
CSS, so the bundle keeps natural case. */}
{!editing && (isMarket
? row(t('common.status'), {order.status ? tCode('status', order.status) : ''})
: row(t('common.triggerPrice'), fmtPrice(order.triggerPrice, inst.digits)))}
{row(t('common.currentPrice'), fmtPrice(curPrice, inst.digits))}
{!editing && !isMarket && row(t('orders.distance'), t('orders.pipsValue', { pips: Math.abs(pipsAway).toFixed(1) }))}
{!editing && row(t('common.takeProfit'), order.tp ? fmtPrice(order.tp, inst.digits) : '—', order.tp ? theme.buy : theme.textTer)}
{!editing && row(t('common.stopLoss'), order.sl ? fmtPrice(order.sl, inst.digits) : '—', order.sl ? theme.sell : theme.textTer)}
{!editing && !isMarket && row(t('common.expiry'), tCode('tif', order.expiry))}
{editing && (
{t('common.triggerPrice')}
setTrig(rnd(trig - pip))} style={{ width: 28, height: 28, borderRadius: 8, background: theme.bgSubtle, display: 'flex', alignItems: 'center', justifyContent: 'center', color: theme.text, fontSize: 17, cursor: 'pointer', flexShrink: 0, userSelect: 'none' }}>−
setTrig(rnd(trig + pip))} style={{ width: 28, height: 28, borderRadius: 8, background: theme.bgSubtle, display: 'flex', alignItems: 'center', justifyContent: 'center', color: theme.text, fontSize: 17, cursor: 'pointer', flexShrink: 0, userSelect: 'none' }}>+
{t('orders.pipsFromMarket', { pips: Math.abs((trig - curPrice) / pip).toFixed(1) })}
)}
{editing && (
setTp(rnd(tp - pip))} onPlus={() => setTp(rnd(tp + pip))}
est={estAt(tp)} theme={theme} inst={inst} />
setSl(rnd(sl - pip))} onPlus={() => setSl(rnd(sl + pip))}
est={estAt(sl)} theme={theme} inst={inst} />
)}
{err &&
{err.msg}
}
{!editing ? (
{!isMarket &&
setEditing(true)} style={{ flex: 1, padding: '14px', borderRadius: 13, background: theme.bgSubtle, color: theme.text, textAlign: 'center', fontWeight: 700, fontSize: 14, cursor: 'pointer' }}>{t('common.action.modify')}
}
{ onConfirmCancel(order); onClose(); }} style={{ flex: 1, padding: '14px', borderRadius: 13, background: theme.sell, color: '#fff', textAlign: 'center', fontWeight: 700, fontSize: 14, cursor: 'pointer', boxShadow: `0 6px 16px ${theme.sell}44` }}>
{t('orders.action.cancelOrder')}
) : (
{ setEditing(false); setErr(null); }} style={{ flex: 1, padding: '14px', borderRadius: 13, background: theme.bgSubtle, color: theme.text, textAlign: 'center', fontWeight: 700, fontSize: 14, cursor: 'pointer' }}>{t('common.action.back')}
{busy ? t('common.action.saving') : t('common.action.save')}
)}