/* CoinASX Contract UI Fix V128
   只修复视觉/自适应，不修改 Vue、接口、订单事件、行情逻辑 */
html{
 --v128-bg:#0b0d0f;--v128-card:#17191e;--v128-card2:#202329;
 --v128-line:#2a2e35;--v128-text:#f5f6f7;--v128-sub:#9298a2;
 --v128-green:#a7ea20;--v128-red:#ff405d;
}
html.cx-theme-light,html[data-theme="light"],html[data-cx-theme="light"]{
 --v128-bg:#fff;--v128-card:#f4f5f7;--v128-card2:#e9ebef;
 --v128-line:#dfe2e7;--v128-text:#17191d;--v128-sub:#747b85;
 --v128-green:#8bd318;--v128-red:#e64359;
}

body:has(.perpetual-open),
.perpetual-open,.perpetual-open~*{color:var(--v128-text)}
.perpetual-open{background:var(--v128-bg)!important;padding-left:14px!important;padding-right:14px!important}

/* 主体左右栏：修复过宽、挤压、错位 */
.perpetual-open>.pt-30.pb-20{padding-top:10px!important;padding-bottom:14px!important}
.perpetual-open>.pt-30.pb-20>.flex{
 display:grid!important;grid-template-columns:minmax(0,1.5fr) minmax(128px,.82fr)!important;
 gap:12px!important;align-items:start!important
}
.perpetual-open .w-440{width:100%!important;min-width:0!important}
.perpetual-open>.pt-30.pb-20>.flex>.ml-30{
 margin-left:0!important;min-width:0!important;padding-left:10px!important;
 border-left:1px solid var(--v128-line)!important
}

/* 开多/开空 */
.perpetual-open .w-440>.flex.items-center.h-66{
 height:44px!important;padding:3px!important;border-radius:10px!important;
 background:var(--v128-card)!important;border:1px solid var(--v128-line)!important
}
.perpetual-open .w-440>.flex.items-center.h-66 p{
 height:36px!important;line-height:36px!important;border-radius:8px!important;
 font-size:14px!important;font-weight:800!important;color:var(--v128-sub)!important
}
.perpetual-open .w-440>.flex.items-center.h-66 p.long{
 background:var(--v128-green)!important;color:#101500!important
}
.perpetual-open .w-440>.flex.items-center.h-66 p:nth-child(2).long{
 background:var(--v128-red)!important;color:#fff!important
}

/* 订单类型 */
.perpetual-open .mt-30.mb-30{margin-top:10px!important;margin-bottom:9px!important}
.perpetual-open .cx127-order-type{
 height:43px!important;min-height:43px!important;border-radius:9px!important;
 background:var(--v128-card)!important;border:1px solid var(--v128-line)!important;
 color:var(--v128-text)!important;font-size:13px!important
}
.perpetual-open .cx127-order-type img[alt="warn-icon"]{width:16px!important;height:16px!important;padding-left:10px!important}
.perpetual-open .cx127-order-type img[alt="select-icon"]{width:12px!important;height:auto!important;padding-right:10px!important}

/* 下拉 */
.perpetual-open .option-box{
 z-index:99!important;border:1px solid var(--v128-line)!important;border-radius:9px!important;
 overflow:hidden!important;background:var(--v128-card2)!important;
 box-shadow:0 12px 32px rgba(0,0,0,.28)!important
}
.perpetual-open .option-box>div{
 min-height:40px!important;line-height:40px!important;padding:0 12px!important;
 font-size:13px!important;color:var(--v128-text)!important;background:var(--v128-card2)!important
}

/* 价格/止盈/止损/数量 */
.perpetual-open .h-76.inputBackground,
.perpetual-open .w-440.inputBackground.h-76{
 height:46px!important;min-height:46px!important;line-height:44px!important;
 margin-bottom:9px!important;border-radius:9px!important;border:1px solid var(--v128-line)!important;
 background:var(--v128-card)!important;padding-right:10px!imp
}
.perpetual-open input{
 height:44px!important;min-width:0!im
 color:var(--v128-text)!important;font-size:13px!important;outline:none!important
}
.perpet
.perpetual-open input:disabled{opacity:1!im
.perpetual-open .h-76.inputBackground span{font-size:11px!important;color:var(--v128-sub)!important}
.perpetual-open .cx126-unit-price{
 display:block!important;margin:-3px 0 8px 2px!important;font-size:10px!important;color:var(--v128-sub)!important
}
.perpetual-open .cx126-unit-price b
.perpetual-open .cx127-tpsl{p

/* 数量 +/- */
.perpetual-open .w-440.inputBackground.h-76>.w-80{width:40px!important;flex:0 0 40px!important}
.perpetual-open
.perpetual-open img[alt="add"]{width:15px!important;height:auto!important}
.perpetual-open img[alt="reduce"]{width:17px!important;height:17px!important}

/* 可开张数 */
.perpetual-open .mt-40.mb-30.w-full{
 margin-top:11px!important;margin-bottom:8px!important;font-size:11px!important
}

/* 百分比滑杆 */
.perpetual-open .amount-slider{padding:4px 4px 0!important}
.perpetual-open .mainBox.vue-slider{width:100%!important}
.perpetual-open .vue-slider-rail{background:var(--v128-line)!important}
.perpetual-open .vue-slider-process{background:var(--v128-green)!important;transition:none!important}
.perpetual-open .custom-step{
 width:10px!important;height:10px!important;border:2px solid var(--v128-line)!important;
 background:var(--v128-bg)!important
}
.perpetual-open .custom-step.active,.perpetual-open .vue-slider-dot-handle{
 background:var(--v128-green)!important;border-color:var(--v128-green)!important
}
.perpetual-open .poecs{margin-top:4px!important;color:var(--v128-sub)!important;font-size:9px!important}

/* 登录区域 */
.perpetual-open .w-full.mt-120{margin-top:24px!important}
.perpetual-open .w-full.mt-120 .textColor{color:var(--v128-sub)!important;font-size:11px!important;line-height:17px!important}
.perpetual-open .w-full.mt-120 .pt-8{padding-top:2px!important}
.perpetual-open .btnBackground{
 height:50px!important;line-height:50px!important;margin-top:13px!important;border-radius:10px!important;
 background:var(--v128-green)!important;color:#101500!important;font-size:14px!important;font-weight:850!important
}

/* 盘口 */
.perpetual-open .deep-data{width:100%!important;min-width:0!important}
.perpetual-open .deep-data>.flex.justify-between.text-grey{
 margin-bottom:4px!important;color:var(--v128-sub)!important;font-size:10px!important
}
.perpetual-open .deep-data .font-26{
 height:25px!important;min-height:25px!important;padding:0 4px!important;
 align-items:center!important;font-size:10.5px!important;line-height:25px!important;
 font-variant-numeric:tabular-nums!important;white-space:nowrap!important;overflow:hidden!important
}
.perpetual-open .deep-data .font-26>div:first-child{overflow:hidden!important;text-overflow:ellipsis!important}
.perpetual-open .deep-data .font-26>div:last-child{overflow:hidden!important;text-overflow:ellipsis!important}
.perpetual-open .deep-data .text-green{color:var(--v128-green)!important}
.perpetual-open .deep-data .text-red{color:var(--v128-red)!important}
.perpetual-open .deep-data .textColor{color:var(--v128-sub)!important}
.perpetual-open .deep-data .font-34{
 margin:5px 0 0!important;padding-top:7px!important;font-size:18px!important;line-height:22px!important;
 font-weight:850!important;font-variant-numeric:tabular-nums!important
}
.perpetual-open .deep-data .approximately-text{
 padding-bottom:7px!important;font-size:10px!important;color:var(--v128-sub)!important
}

/* 盘口底部精度选择 */
.perpetual-open .k-select-box{align-items:center!important;gap:7px!important}
.perpetual-open .k-select-box .select-box{
 flex:1!important;margin-top:9px!important;margin-bottom:9px!important;
 border:1px solid var(--v128-line)!important;border-radius:8px!important;background:var(--v128-card)!important
}
.perpetual-open .k-select-box .select-box .h-70{height:38px!important}
.perpetual-open .k-select-box .select-box .pl-16{padding-left:9px!important;font-size:11px!important}

/* 清理旧的大间距 */
.perpetual-open .mb-30{margin-bottom:9px!important}
.perpetual-open .mt-30{margin-top:9px!important}

/* 防止实时行情数字闪动 */
.perpetual-open .deep-data *,
.perpetual-open .deep-data .font-26,
.perpetual-open .deep-data .font-34{
 animation:none!important;transition:none!important
}

/* 手机自适应 */
@media(max-width:390px){
 .perpetual-open{padding-left:10px!important;padding-right:10px!important}
 .perpetual-open>.pt-30.pb-20>.flex{
   grid-template-columns:minmax(0,1.48fr) minmax(108px,.78fr)!important;gap:8px!important
 }
 .perpetual-open>.pt-30.pb-20>.flex>.ml-30{padding-left:7px!important}
 .perpetual-open .deep-data .font-26{font-size:9.5px!important;padding-left:2px!important;padding-right:2px!important}
 .perpetual-open .deep-data .font-34{font-size:16px!important}
 .perpetual-open .h-76.inputBackground,.perpetual-open .w-440.inputBackground.h-76{height:44px!important;min-height:44px!important}
 .perpetual-open input{height:42px!important;font-size:12px!important}
}
