:root{font-synthesis:none;text-rendering:optimizelegibility;color:#162033;background:#f5f7fb;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}body{min-width:320px;min-height:100vh;margin:0}button,input,select{font-family:inherit}#root{min-height:100vh}*{box-sizing:border-box}.app-shell{color:#162033;background:#f5f7fb;min-height:100vh}.loading-page{text-align:center;color:#64748b;padding:60px}.topbar{background:#fff;border-bottom:1px solid #e4e8f0;justify-content:space-between;align-items:center;padding:24px 36px;display:flex}.topbar h1,.page-actions h2,.section-heading h2,.result-header h2{margin:4px 0 0}.eyebrow{letter-spacing:.12em;color:#64748b;font-size:12px;font-weight:700}.status-badge,.status-pill{color:#4338ca;background:#eef2ff;border-radius:999px;font-weight:700}.status-badge{padding:8px 12px;font-size:13px}.status-pill{padding:5px 9px;font-size:11px}.page{width:min(1440px,100% - 48px);margin:28px auto 60px}.page-actions,.section-heading,.result-header,.detail-nav{justify-content:space-between;align-items:center;gap:24px;display:flex}.page-actions{margin-bottom:20px}.page-actions p,.section-heading p,.result-header p{color:#64748b;margin:5px 0 0}.panel{background:#fff;border:1px solid #e4e8f0;border-radius:14px;margin-bottom:24px;padding:24px;box-shadow:0 5px 18px #0f172a0a}.primary-button,.secondary-button,.run-button,.link-button{font:inherit;cursor:pointer;border:0;border-radius:8px;font-weight:700}.primary-button,.run-button{color:#fff;background:#4f46e5;padding:11px 16px}.primary-button:hover,.run-button:hover{background:#4338ca}.secondary-button{color:#4338ca;background:#eef2ff;padding:8px 14px}.link-button{color:#4f46e5;background:0 0;padding:0}button:disabled{opacity:.55;cursor:default}.strategy-list{flex-direction:column;display:flex}.strategy-row{border-bottom:1px solid #eef2f6;grid-template-columns:minmax(260px,2fr) 1fr 90px 100px 90px;align-items:center;gap:20px;padding:16px 4px;display:grid}.strategy-row:last-child{border-bottom:0}.strategy-main{flex-direction:column;gap:4px;display:flex}.strategy-main strong{font-size:15px}.strategy-main span{color:#64748b;font-size:13px}.empty-state{text-align:center;color:#64748b;padding:50px}.detail-nav{color:#64748b;margin-bottom:18px;font-size:13px}.strategy-form{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px;margin-top:24px;display:grid}.strategy-form label,.backtest-controls label{color:#475569;flex-direction:column;gap:7px;font-size:13px;font-weight:600;display:flex}.strategy-form input,.strategy-form select,.backtest-controls input{color:#0f172a;min-height:42px;font:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:8px;outline:none;padding:0 12px}.strategy-form input:focus,.strategy-form select:focus,.backtest-controls input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f11f}.asset-field{align-items:center;display:flex}.asset-field input{border-radius:8px 0 0 8px;flex:1}.asset-field span{color:#64748b;background:#f8fafc;border:1px solid #cbd5e1;border-left:0;border-radius:0 8px 8px 0;align-items:center;min-height:42px;padding:0 12px;display:flex}.description-field{grid-column:span 2}.form-actions{align-items:end;display:flex}.constructor-panel{overflow:hidden}.constructor-readonly{color:#64748b;white-space:nowrap;background:#f8fafc;border-radius:999px;align-items:center;min-height:30px;padding:0 10px;font-size:12px;font-weight:700;display:inline-flex}.constructor-inputs{border-bottom:1px solid #eef2f6;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:22px;padding-bottom:22px;display:grid}.constructor-input{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;flex-direction:column;gap:6px;padding:14px;display:flex}.constructor-input span{letter-spacing:.08em;text-transform:uppercase;color:#64748b;font-size:10px;font-weight:800}.constructor-input strong{color:#0f172a;font-size:14px}.constructor-input code{color:#475569;background:#fff;border-radius:6px;width:fit-content;padding:4px 7px;font-size:12px}.constructor-rules{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:22px;display:grid}.constructor-rule-card{background:#fbfcfe;border:1px solid #e2e8f0;border-radius:12px;min-width:0;padding:18px}.constructor-rule-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;display:flex}.constructor-rule-heading strong{color:#0f172a;font-size:14px}.rule-status{text-transform:uppercase;letter-spacing:.05em;border-radius:999px;align-items:center;min-height:24px;padding:0 8px;font-size:10px;font-weight:800;display:inline-flex}.rule-status.enabled{color:#047857;background:#ecfdf5}.rule-status.disabled{color:#64748b;background:#f1f5f9}.rule-group{background:#fff;border:1px solid #dbe2ea;border-radius:10px;padding:12px}.rule-group .rule-group{border-left:3px solid #c7d2fe;margin-top:10px;margin-left:12px}.rule-group-header{color:#64748b;align-items:center;gap:8px;margin-bottom:10px;font-size:11px;display:flex}.rule-group-operator{color:#4338ca;background:#eef2ff;border-radius:6px;align-items:center;min-height:24px;padding:0 8px;font-weight:800;display:inline-flex}.rule-group-items{flex-direction:column;gap:9px;display:flex}.condition-row{background:#f8fafc;border-radius:8px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;padding:10px;display:grid}.condition-operand{text-overflow:ellipsis;white-space:nowrap;color:#0f172a;background:#fff;border:1px solid #dbe2ea;border-radius:7px;padding:7px 9px;font-size:12px;font-weight:700;overflow:hidden}.condition-operator{color:#6366f1;text-align:center;min-width:92px;font-size:12px;font-weight:800}.rule-empty{text-align:center;color:#94a3b8;background:#fff;border:1px dashed #cbd5e1;border-radius:9px;padding:18px;font-size:12px}.backtest-controls{align-items:end;gap:16px;margin-top:22px;display:flex}.backtest-controls label{width:200px}.run-button{min-height:42px}.error-message{color:#b91c1c;background:#fef2f2;border-radius:8px;margin-bottom:18px;padding:12px 14px;font-size:14px}.result-header{margin:30px 2px 18px}.data-summary{color:#64748b;font-size:14px}.metrics-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:24px;display:grid}.metric-card{background:#fff;border:1px solid #e4e8f0;border-radius:12px;flex-direction:column;gap:8px;padding:18px;display:flex}.metric-card span{color:#64748b;font-size:13px}.metric-card strong{font-size:25px}.positive{color:#15803d}.negative{color:#b91c1c}.chart-wrapper{margin-top:18px}.equity-chart{background:#fbfcfe;border:1px solid #edf0f5;border-radius:10px;width:100%;height:280px;display:block}.chart-axis{stroke:#d9dee8;stroke-width:1px}.chart-line{stroke:#4f46e5;stroke-width:3px;stroke-linejoin:round;stroke-linecap:round}.chart-range{color:#64748b;justify-content:space-between;padding:7px 28px 0;font-size:12px;display:flex}.empty-chart{text-align:center;color:#64748b;background:#f8fafc;border-radius:10px;margin-top:18px;padding:50px}.table-wrapper{margin-top:20px;overflow-x:auto}table{border-collapse:collapse;white-space:nowrap;width:100%;font-size:13px}th{text-align:left;color:#64748b;background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:11px 12px;font-weight:600}td{border-bottom:1px solid #eef2f6;padding:11px 12px}.side{text-align:center;border-radius:6px;min-width:54px;padding:4px 7px;font-size:11px;font-weight:700;display:inline-block}.side.long{color:#047857;background:#ecfdf5}.side.short{color:#b91c1c;background:#fef2f2}@media (width<=900px){.strategy-row{grid-template-columns:1fr;gap:8px}.description-field{grid-column:auto}.constructor-rules{grid-template-columns:1fr}.backtest-controls{flex-direction:column;align-items:stretch}.backtest-controls label{width:auto}}@media (width<=720px){.topbar{padding:18px}.status-badge{display:none}.page{width:calc(100% - 24px)}.page-actions,.section-heading,.result-header{flex-direction:column;align-items:flex-start}.condition-row{grid-template-columns:1fr}.condition-operator{text-align:left;min-width:0}}
