319319 }
320320
321321 .execution-cash-policy-section {
322- grid-template-columns : 1 fr ;
322+ gap : 12 px 14 px ;
323323 }
324324
325- .execution-cash-policy-heading {
325+ .form-section-head {
326326 grid-column : 1 / -1 ;
327327 margin : 0 ;
328- font-size : 13px ;
328+ font-size : 12px ;
329+ line-height : 1.3 ;
329330 font-weight : 780 ;
331+ letter-spacing : 0.05em ;
332+ text-transform : uppercase;
333+ color : var (--muted );
334+ }
335+
336+ .execution-cash-policy-heading {
330337 color : var (--ink );
338+ font-size : 13px ;
339+ letter-spacing : 0.03em ;
340+ text-transform : none;
331341 }
332342
333343 .execution-cash-policy-note {
343353 display : grid;
344354 grid-template-columns : repeat (2 , minmax (0 , 1fr ));
345355 gap : 14px ;
346- align-items : start;
356+ align-items : stretch;
357+ }
358+
359+ .policy-card {
360+ display : grid;
361+ gap : 12px ;
362+ min-width : 0 ;
363+ padding : 14px 14px 12px ;
364+ border : 1px solid var (--line );
365+ border-radius : 10px ;
366+ background :
367+ linear-gradient (180deg , color-mix (in srgb, var (--platform-color , var (--accent )) 4% , # ffffff ), # ffffff 72% );
368+ box-shadow : inset 0 1px 0 rgba (255 , 255 , 255 , 0.85 );
369+ }
370+
371+ .policy-card-title {
372+ margin : 0 ;
373+ font-size : 13px ;
374+ line-height : 1.35 ;
375+ font-weight : 780 ;
376+ color : var (--ink );
377+ }
378+
379+ .policy-card .control-block {
380+ grid-template-rows : auto 48px minmax (18px , auto);
381+ }
382+
383+ .policy-card .control-block > span : first-child : not (.selection-meta ) {
384+ display : none;
385+ }
386+
387+ .policy-card .policy-card-muted {
388+ opacity : 0.58 ;
389+ }
390+
391+ .policy-card .policy-card-muted .selection-meta {
392+ color : var (--danger );
347393 }
348394
349395 .policy-block-muted .selection-meta {
452498 display : grid;
453499 grid-template-columns : repeat (2 , minmax (0 , 1fr ));
454500 align-items : start;
455- gap : 16 px 14px ;
501+ gap : 18 px 14px ;
456502 }
457503
458504 .control-block {
475521 }
476522
477523 .form-section + .form-section {
478- padding-top : 16px ;
524+ padding-top : 18px ;
525+ margin-top : 2px ;
479526 border-top : 1px solid var (--line );
480527 }
481528
@@ -1346,6 +1393,7 @@ <h2 id="platform-title">LongBridge</h2>
13461393 </ div >
13471394
13481395 < div class ="form-section runtime-section ">
1396+ < h3 class ="form-section-head " data-i18n ="runtimeSectionTitle "> 运行与插件</ h3 >
13491397 < label class ="control-block account-status-block ">
13501398 < span data-i18n ="runtimeTargetMode "> 账号运行状态</ span >
13511399 < select id ="runtime-target-enabled-select "> </ select >
@@ -1366,6 +1414,7 @@ <h2 id="platform-title">LongBridge</h2>
13661414 </ div >
13671415
13681416 < div class ="form-section income-layer-section " id ="income-layer-section ">
1417+ < h3 class ="form-section-head " data-i18n ="incomeLayerSectionTitle "> 收入层</ h3 >
13691418 < label class ="control-block income-layer-mode-block section-wide ">
13701419 < span data-i18n ="incomeLayerMode "> 收入层状态</ span >
13711420 < select id ="income-layer-mode-select "> </ select >
@@ -1386,6 +1435,7 @@ <h2 id="platform-title">LongBridge</h2>
13861435 </ div >
13871436
13881437 < div class ="form-section option-overlay-section " id ="option-overlay-section ">
1438+ < h3 class ="form-section-head " data-i18n ="optionOverlaySectionTitle "> 期权层</ h3 >
13891439 < label class ="control-block option-overlay-mode-block section-wide ">
13901440 < span data-i18n ="optionOverlayMode "> 期权层状态</ span >
13911441 < select id ="option-overlay-mode-select "> </ select >
@@ -1394,37 +1444,44 @@ <h2 id="platform-title">LongBridge</h2>
13941444 </ div >
13951445
13961446 < div class ="form-section execution-cash-policy-section " id ="execution-cash-policy-section ">
1397- < h3 class ="execution-cash-policy-heading " data-i18n ="executionCashPolicyTitle "> 现金与融资</ h3 >
1447+ < h3 class ="form-section-head execution-cash-policy-heading " data-i18n ="executionCashPolicyTitle "> 现金与融资</ h3 >
13981448 < p class ="execution-cash-policy-note " id ="execution-cash-policy-note " data-i18n ="executionCashPolicyNote "> 允许融资与预留现金覆盖不能同时生效。</ p >
13991449 < p class ="execution-cash-policy-note qmt-platform-cash-note " id ="qmt-platform-cash-note " hidden data-i18n ="qmtPlatformCashNote "> A 股 QMT 不使用 margin / 平台预留现金;现金约束在策略参数 execution_cash_reserve_ratio 内配置。</ p >
14001450 < div class ="execution-cash-policy-grid " id ="execution-cash-policy-grid ">
1401- < label class ="control-block cash-only-mode-block policy-block " id ="cash-only-policy-block ">
1402- < span data-i18n ="cashOnlyExecutionMode "> 允许融资</ span >
1403- < select id ="cash-only-execution-mode-select "> </ select >
1404- < span class ="selection-meta " id ="cash-only-execution-mode-meta "> </ span >
1405- </ label >
1406-
1407- < label class ="control-block reserve-policy-block policy-block " id ="reserve-policy-block ">
1408- < span data-i18n ="reservedCashMode "> 预留现金策略</ span >
1409- < select id ="reserve-policy-mode-select "> </ select >
1410- < span class ="selection-meta " id ="reserve-policy-mode-meta " data-i18n ="reservedCashModeMeta "> 选择是否沿用、清空或覆盖平台预留现金。</ span >
1411- </ label >
1412-
1413- < label class ="control-block min-reserve-block policy-block " id ="min-reserve-block ">
1414- < span id ="min-reserved-cash-label "> 最小预留现金</ span >
1415- < input id ="min-reserved-cash-input " type ="number " inputmode ="decimal " min ="0 " step ="1 ">
1416- < span class ="selection-meta " data-i18n ="reservedCashMeta "> 固定金额下限,可单独设置或与比例取较大值。</ span >
1417- </ label >
1418-
1419- < label class ="control-block reserve-ratio-block policy-block " id ="reserve-ratio-block ">
1420- < span data-i18n ="reservedCashRatio "> 预留现金比例</ span >
1421- < input id ="reserved-cash-ratio-input " type ="number " inputmode ="decimal " min ="0 " max ="1 " step ="0.01 ">
1422- < span class ="selection-meta " data-i18n ="reservedCashRatioMeta "> 例如 0.03 表示 3%。</ span >
1423- </ label >
1451+ < div class ="policy-card " id ="margin-policy-card ">
1452+ < p class ="policy-card-title " data-i18n ="cashOnlyExecutionMode "> 允许融资</ p >
1453+ < label class ="control-block cash-only-mode-block policy-block " id ="cash-only-policy-block ">
1454+ < span data-i18n ="cashOnlyExecutionMode "> 允许融资</ span >
1455+ < select id ="cash-only-execution-mode-select "> </ select >
1456+ < span class ="selection-meta " id ="cash-only-execution-mode-meta "> </ span >
1457+ </ label >
1458+ </ div >
1459+
1460+ < div class ="policy-card " id ="reserve-policy-card ">
1461+ < p class ="policy-card-title " data-i18n ="reservedCashMode "> 预留现金策略</ p >
1462+ < label class ="control-block reserve-policy-block policy-block " id ="reserve-policy-block ">
1463+ < span data-i18n ="reservedCashMode "> 预留现金策略</ span >
1464+ < select id ="reserve-policy-mode-select "> </ select >
1465+ < span class ="selection-meta " id ="reserve-policy-mode-meta " data-i18n ="reservedCashModeMeta "> 选择是否沿用、清空或覆盖平台预留现金。</ span >
1466+ </ label >
1467+
1468+ < label class ="control-block min-reserve-block policy-block " id ="min-reserve-block ">
1469+ < span id ="min-reserved-cash-label "> 最小预留现金</ span >
1470+ < input id ="min-reserved-cash-input " type ="number " inputmode ="decimal " min ="0 " step ="1 ">
1471+ < span class ="selection-meta " data-i18n ="reservedCashMeta "> 固定金额下限,可单独设置或与比例取较大值。</ span >
1472+ </ label >
1473+
1474+ < label class ="control-block reserve-ratio-block policy-block " id ="reserve-ratio-block ">
1475+ < span data-i18n ="reservedCashRatio "> 预留现金比例</ span >
1476+ < input id ="reserved-cash-ratio-input " type ="number " inputmode ="decimal " min ="0 " max ="1 " step ="0.01 ">
1477+ < span class ="selection-meta " data-i18n ="reservedCashRatioMeta "> 例如 0.03 表示 3%。</ span >
1478+ </ label >
1479+ </ div >
14241480 </ div >
14251481 </ div >
14261482
14271483 < div class ="form-section dca-section ">
1484+ < h3 class ="form-section-head " data-i18n ="dcaSectionTitle "> 定投</ h3 >
14281485 < label class ="control-block dca-mode-block ">
14291486 < span data-i18n ="dcaMode "> 定投模式</ span >
14301487 < select id ="dca-mode-select "> </ select >
@@ -1632,6 +1689,7 @@ <h2 data-i18n="summary">切换摘要</h2>
16321689 live : "实盘" ,
16331690 paper : "模拟" ,
16341691 runtimeTargetMode : "账号运行状态" ,
1692+ runtimeSectionTitle : "运行与插件" ,
16351693 runtimeTargetCurrent : "沿用当前状态" ,
16361694 runtimeTargetEnabled : "启用" ,
16371695 runtimeTargetDisabled : "禁用" ,
@@ -1646,6 +1704,7 @@ <h2 data-i18n="summary">切换摘要</h2>
16461704 ibitZscoreExitDisabled : "禁用逃顶(只买不卖)" ,
16471705 ibitZscoreExitModeMeta : "插件启用后默认实盘消费动态 Z-Score 信号;可改为观察模式,或禁用后只买不卖。" ,
16481706 incomeLayerMode : "收入层状态" ,
1707+ incomeLayerSectionTitle : "收入层" ,
16491708 incomeLayerCurrent : "沿用当前配置" ,
16501709 incomeLayerEnabled : "开启收入层" ,
16511710 incomeLayerDisabled : "关闭收入层" ,
@@ -1658,6 +1717,7 @@ <h2 data-i18n="summary">切换摘要</h2>
16581717 incomeLayerStartMeta : "总资产达到该金额后启用收入层。" ,
16591718 incomeLayerRatioMeta : "例如 0.55 表示最高 55%。" ,
16601719 optionOverlayMode : "期权层状态" ,
1720+ optionOverlaySectionTitle : "期权层" ,
16611721 optionOverlayCurrent : "沿用当前配置" ,
16621722 optionOverlayEnabled : "启用期权层" ,
16631723 optionOverlayDisabled : "关闭期权层" ,
@@ -1685,6 +1745,7 @@ <h2 data-i18n="summary">切换摘要</h2>
16851745 qmtDryRunOnlyNote : "QMT 当前仅支持 dry-run(模拟),尚无 live 券商账号。" ,
16861746 invalidExecutionCashPolicyNote : "允许融资与预留现金覆盖冲突,请只保留一种约束。" ,
16871747 dcaMode : "定投模式" ,
1748+ dcaSectionTitle : "定投" ,
16881749 dcaModeFixed : "定额定投" ,
16891750 dcaModeSmart : "智能定投" ,
16901751 dcaBaseInvestmentUsd : "定投基准金额" ,
@@ -1791,6 +1852,7 @@ <h2 data-i18n="summary">切换摘要</h2>
17911852 live : "Live" ,
17921853 paper : "Dry run" ,
17931854 runtimeTargetMode : "Account status" ,
1855+ runtimeSectionTitle : "Runtime and plugins" ,
17941856 runtimeTargetCurrent : "Keep current status" ,
17951857 runtimeTargetEnabled : "Enabled" ,
17961858 runtimeTargetDisabled : "Disabled" ,
@@ -1805,6 +1867,7 @@ <h2 data-i18n="summary">切换摘要</h2>
18051867 ibitZscoreExitDisabled : "Disabled (buy only)" ,
18061868 ibitZscoreExitModeMeta : "When plugins are enabled, live consumption is the default. Paper mode observes only; disabled mode keeps buy-only DCA." ,
18071869 incomeLayerMode : "Income layer" ,
1870+ incomeLayerSectionTitle : "Income layer" ,
18081871 incomeLayerCurrent : "Keep current config" ,
18091872 incomeLayerEnabled : "Enable income layer" ,
18101873 incomeLayerDisabled : "Disable income layer" ,
@@ -1817,6 +1880,7 @@ <h2 data-i18n="summary">切换摘要</h2>
18171880 incomeLayerStartMeta : "Income layer activates after total assets reach this amount." ,
18181881 incomeLayerRatioMeta : "Use 0.55 for a 55% cap." ,
18191882 optionOverlayMode : "Option layer" ,
1883+ optionOverlaySectionTitle : "Option layer" ,
18201884 optionOverlayCurrent : "Keep current config" ,
18211885 optionOverlayEnabled : "Enable option layer" ,
18221886 optionOverlayDisabled : "Disable option layer" ,
@@ -1844,6 +1908,7 @@ <h2 data-i18n="summary">切换摘要</h2>
18441908 qmtDryRunOnlyNote : "QMT is dry-run only for now; no live broker accounts are configured." ,
18451909 invalidExecutionCashPolicyNote : "Allow margin and reserve-cash overrides conflict. Keep only one constraint." ,
18461910 dcaMode : "DCA mode" ,
1911+ dcaSectionTitle : "DCA" ,
18471912 dcaModeFixed : "Fixed DCA" ,
18481913 dcaModeSmart : "Smart DCA" ,
18491914 dcaBaseInvestmentUsd : "Base DCA amount" ,
@@ -3659,6 +3724,7 @@ <h2 data-i18n="summary">切换摘要</h2>
36593724 el ( "reserve-policy-block" ) . classList . toggle ( "policy-block-muted" , marginBlocksReserve ) ;
36603725 el ( "min-reserve-block" ) . classList . toggle ( "policy-block-muted" , marginBlocksReserve ) ;
36613726 el ( "reserve-ratio-block" ) . classList . toggle ( "policy-block-muted" , marginBlocksReserve ) ;
3727+ el ( "reserve-policy-card" ) . classList . toggle ( "policy-card-muted" , marginBlocksReserve ) ;
36623728 el ( "reserve-policy-mode-meta" ) . textContent = marginBlocksReserve
36633729 ? t ( "executionCashMarginBlocksReserve" )
36643730 : t ( "reservedCashModeMeta" ) ;
@@ -3717,6 +3783,7 @@ <h2 data-i18n="summary">切换摘要</h2>
37173783 cashOnlyExecutionModeSelect . append ( option ) ;
37183784 }
37193785 el ( "cash-only-policy-block" ) . classList . toggle ( "policy-block-muted" , reserveBlocksMargin ) ;
3786+ el ( "margin-policy-card" ) . classList . toggle ( "policy-card-muted" , reserveBlocksMargin ) ;
37203787 el ( "cash-only-execution-mode-meta" ) . textContent = reserveBlocksMargin
37213788 ? t ( "executionCashReserveBlocksMargin" )
37223789 : t ( "cashOnlyExecutionModeMeta" ) ;
0 commit comments