:root{--bg-color: #eceef3;--card-bg: #f8f9fc;--text-color: #1c2538;--muted-text: #62708a;--border-color: #d9dde7;--grid-color: #dbe1ec;--up-color: #16a34a;--down-color: #ef4444;--spot-color: #2563eb;--pm-volume-color: #10b981;--spot-volume-color: #3b82f6}.app-root{min-height:100vh;background:radial-gradient(circle at top left,#f4f6fb 0%,var(--bg-color) 55%)}.tabs-header{padding:14px 20px 0;background:transparent}.tabs-segment{display:inline-flex;gap:8px;padding:6px;border-radius:16px;border:1px solid #cdd4e1;background:linear-gradient(180deg,#e8edf5,#dfe6f1);box-shadow:inset 0 1px #ffffff59}.tab-btn{border:1px solid transparent;border-radius:12px;background:#e9eef6;color:#54627c;font-weight:700;letter-spacing:.015em;padding:10px 20px;min-width:132px;min-height:42px;cursor:pointer;transition:all .15s ease}.backtest-run-page{display:grid;gap:14px;min-width:0}.backtest-run-card{padding:14px}.backtest-run-form{display:grid;gap:12px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.field{display:grid;gap:6px;font-size:13px;color:#475569}.field input,.field select,.field textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#0f172a;padding:9px 10px;font-size:14px}.toggle-grid{display:flex;flex-wrap:wrap;gap:12px;font-size:13px;color:#334155}.json-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}.primary-btn,.secondary-btn{border:1px solid #cbd5e1;border-radius:10px;padding:9px 12px;font-size:14px;font-weight:600;cursor:pointer}.primary-btn{background:#0f172a;color:#fff;border-color:#0f172a}.secondary-btn{background:#fff;color:#1e293b}.backtest-run-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px}.jobs-block h3{margin:0 0 8px;font-size:15px}.jobs-list{display:grid;gap:8px;max-height:280px;overflow:auto}.job-row{border:1px solid #dbe4f0;border-radius:10px;background:#f8fbff;display:flex;gap:8px;align-items:center;padding:6px;font-size:13px}.job-row.selected{border-color:#1d4ed8;background:#eff6ff}.job-row-main{border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:4px 6px;font:inherit;color:inherit;cursor:pointer;text-align:left}.job-row-action{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:8px;padding:6px 10px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}.job-row-action:disabled{opacity:.6;cursor:progress}.status-pill{border-radius:999px;padding:2px 8px;font-size:12px;border:1px solid #cbd5e1}.status-pill-btn{cursor:pointer}.status-pill.queued,.status-pill.running{background:#fef9c3;border-color:#fcd34d}.status-pill.stop_requested{background:#fef3c7;border-color:#f59e0b}.status-pill.stopped{background:#f1f5f9;border-color:#cbd5e1}.status-pill.completed{background:#dcfce7;border-color:#86efac}.status-pill.failed{background:#fee2e2;border-color:#fca5a5}.logs-card{padding:14px;min-width:0}.logs-pre{margin:0;border-radius:10px;border:1px solid #cbd5e1;background:#0f172a;color:#e2e8f0;padding:10px;width:100%;max-width:100%;max-height:min(42vh,520px);overflow-x:auto;overflow-y:auto;font-size:12px;line-height:1.35}.backtest-run-page>.card{min-width:0}.optuna-page{display:grid;gap:14px;padding:14px}.optuna-card{padding:14px}.optuna-form{display:grid;gap:12px}.optuna-actions{display:flex;gap:10px;flex-wrap:wrap}.form-error{margin:0;color:#b91c1c;font-size:13px}.optuna-list-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:8px}.optuna-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.optuna-collapse-btn{border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;padding:6px 10px;font-size:12px;font-weight:600;cursor:pointer}.optuna-runs-filters{display:flex;align-items:center;gap:8px}.optuna-study-runs-scroll{max-height:420px;overflow:auto;border:1px solid #dbe4f0;border-radius:10px}.field-inline{width:auto;min-width:160px}.field-label{font-size:12px;color:#64748b;font-weight:600}.optuna-list{display:grid;gap:8px;max-height:260px;overflow:auto}.optuna-list-item{border:1px solid #dbe4f0;border-radius:10px;background:#f8fbff;color:#1e293b;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px}.optuna-list-item.optuna-list-item-positive{border-color:#86efac;background:#f0fdf4}.optuna-list-item.optuna-list-item-negative{border-color:#fda4af;background:#fff1f2}.optuna-list-item.active{border-color:#1d4ed8;box-shadow:0 0 0 1px #1d4ed840 inset}.optuna-list-item-select{border:0;background:transparent;color:inherit;width:100%;min-width:0;text-align:left;display:grid;gap:3px;padding:0;cursor:pointer}.optuna-list-item-main{font-size:13px;font-weight:700;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.optuna-list-item-meta{font-size:12px;color:#64748b}.optuna-list-item-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.optuna-delete-btn{border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;border-radius:8px;padding:6px 10px;font-size:12px;font-weight:700;cursor:pointer}.optuna-delete-btn:disabled{opacity:.6;cursor:not-allowed}.optuna-progress-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;font-size:14px}.optuna-progress-wrap{display:grid;gap:10px}.optuna-params-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px 12px;font-size:14px}.optuna-json-pre{margin:0}.optuna-live-logs{display:grid;gap:6px}.optuna-fixed-base,.optuna-tunable-groups{display:grid;gap:8px;border:1px solid #dbe4f0;border-radius:12px;padding:10px 12px;background:#f8fbff}.optuna-tunable-groups-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 10px}.optuna-tunable-group-item{display:flex;align-items:flex-start;gap:8px;padding:6px 8px;border:1px solid #dbe4f0;border-radius:10px;background:#fff}.optuna-tunable-group-item input[type=checkbox]{margin-top:2px;width:16px;height:16px;flex:0 0 auto}.optuna-tunable-group-text{display:grid;gap:2px}.optuna-tunable-group-title{font-size:13px;color:#0f172a;font-weight:600}.optuna-tunable-group-title-row{display:inline-flex;align-items:center;gap:6px}.optuna-tunable-group-hint{font-size:12px;color:#64748b}.optuna-tunable-group-help{position:relative;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border:1px solid #94a3b8;border-radius:999px;color:#475569;background:#fff;font-size:11px;font-weight:700;line-height:1;cursor:help;-webkit-user-select:none;user-select:none}.optuna-tunable-group-help:focus-visible{outline:2px solid #3b82f6;outline-offset:1px}.optuna-tunable-group-tooltip-floating{position:fixed;max-height:min(42vh,220px);overflow:auto;padding:8px 10px;border-radius:8px;border:1px solid #cbd5e1;background:#0f172a;color:#e2e8f0;font-size:11px;line-height:1.35;box-shadow:0 8px 22px #0f172a59;z-index:1000;pointer-events:none}.optuna-tunable-group-tooltip-title{display:block;color:#cbd5e1;font-weight:700;margin-bottom:4px}.optuna-tunable-group-tooltip-list{display:block;color:#e2e8f0;word-break:break-word}.optuna-tunable-groups-note{font-size:12px}.optuna-fixed-base-grid{grid-template-columns:minmax(220px,1.6fr) minmax(140px,1fr) minmax(140px,1fr) minmax(170px,1fr) minmax(140px,1fr)}.optuna-fixed-base-note{font-size:12px}.optuna-live-logs-pre{margin:0;border-radius:10px;border:1px solid #cbd5e1;background:#0f172a;color:#e2e8f0;padding:10px;width:100%;max-width:100%;max-height:min(34vh,360px);overflow-x:auto;overflow-y:auto;font-size:12px;line-height:1.35}@media (max-width: 1100px){.optuna-fixed-base-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}}.optuna-heartbeat-stale{color:#b91c1c;font-weight:700}.section-title{margin:0 0 10px;font-size:18px}.section-subtitle{margin:2px 0 6px;font-size:15px;color:#334155}.strategy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:10px}.strategy-grid .field input[type=checkbox]{width:18px;height:18px}.strategy-section-base .strategy-grid{grid-template-columns:minmax(180px,1.2fr) minmax(120px,.8fr) minmax(140px,.9fr) minmax(120px,.85fr) minmax(120px,.85fr)}.strategy-section-base .strategy-field-compact input,.strategy-section-base .strategy-field-compact select,.strategy-section-base .strategy-field-compact textarea{max-width:180px}.strategy-section{display:grid;gap:8px;border:1px solid #d6deec;border-radius:12px;padding:12px;background:linear-gradient(180deg,#f8fbff,#f4f7fd)}.strategy-section+.strategy-section{margin-top:10px}.strategy-section-title{margin:0 0 2px;font-size:16px;font-weight:700;color:#0f172a;text-align:center;letter-spacing:.01em}.error-text{color:#b91c1c;margin:6px 0 0}.muted{color:#64748b}.tab-btn.active{background:#0f172a;color:#fff;border-color:#0f172a;box-shadow:inset 0 1px #ffffff14}.tab-btn:not(.active):hover{border-color:#b9c4d8;color:#334155;background:#f1f4fa}.page{box-sizing:border-box;min-height:100vh;padding:20px;background:radial-gradient(circle at top left,#f4f6fb 0%,var(--bg-color) 55%);color:var(--text-color);font-family:IBM Plex Sans,Segoe UI,sans-serif}.card{background:var(--card-bg);border:1px solid var(--border-color);border-radius:14px;box-shadow:0 8px 28px #1c25380f;margin-bottom:18px}.controls{padding:16px;background:linear-gradient(180deg,#f9fbff,#f1f5fc)}.backtest-page{padding-top:12px}.backtest-run-controls{padding:14px;background:linear-gradient(180deg,#f9fbff,#f1f5fc)}.backtest-run-controls-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:12px}.backtest-run-field{min-width:0;position:relative}.backtest-run-autocomplete-input{min-width:100%}.backtest-run-autocomplete-input:disabled{opacity:.65;cursor:not-allowed}.backtest-run-dropdown{position:absolute;left:0;right:0;top:calc(100% + 6px);max-height:340px;overflow-y:auto;border:1px solid #c6d1e3;background:#fff;border-radius:12px;box-shadow:0 10px 26px #1c253829;padding:4px;z-index:30}.backtest-run-option{width:100%;border:0;background:transparent;color:#334155;text-align:left;font-family:inherit;font-size:15px;line-height:1.35;padding:8px 10px;border-radius:8px;cursor:pointer}.backtest-run-option-row{display:flex;align-items:stretch;gap:6px;border-radius:8px;padding:0}.backtest-run-option-row.selected{background:#0f172a;color:#fff}.backtest-run-option-select{flex:1;color:inherit}.backtest-run-option-row.selected .backtest-run-option-select:hover{background:#ffffff14}.backtest-run-option-delete{flex:0 0 auto;width:28px;min-height:32px;border:0;border-radius:8px;margin:4px 4px 4px 0;background:#fee2e2;color:#b91c1c;font-size:16px;line-height:1;font-weight:700;cursor:pointer}.backtest-run-option-delete:hover{background:#fecaca}.backtest-run-option-delete:disabled{opacity:.5;cursor:wait}.backtest-run-option-row.selected .backtest-run-option-delete{background:#b91c1c38;color:#fecaca}.backtest-run-option-row.selected .backtest-run-option-delete:hover{background:#b91c1c5c}.backtest-run-option:hover{background:#eef2f8}.backtest-run-option.selected{background:#0f172a;color:#fff}.backtest-run-option-muted,.backtest-run-option-muted:hover{cursor:default;color:#64748b;background:transparent}.run-quick-stats{margin-top:10px;display:flex;flex-direction:column;gap:8px}.run-quick-stats-line{font-size:12px;line-height:1.25;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.run-summary-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.run-summary-pill{display:grid;grid-template-columns:auto 1fr;column-gap:6px;row-gap:1px;align-items:baseline;padding:6px 8px;border-radius:9px;border:1px solid #d8deea;background:#f8fafe}.run-summary-pill-pnl{border-color:#a5b4fc;background:linear-gradient(180deg,#eef2ff,#e9efff)}.run-summary-pill-pnl.positive{border-color:#86efac;background:linear-gradient(180deg,#f0fdf4,#e8f9ef)}.run-summary-pill-pnl.negative{border-color:#fca5a5;background:linear-gradient(180deg,#fef2f2,#fdecec)}.run-summary-pill-pnl.positive .run-summary-pill-value{color:var(--up-color)}.run-summary-pill-pnl.negative .run-summary-pill-value{color:var(--down-color)}.run-summary-pill-wins{border-color:#86efac;background:linear-gradient(180deg,#f0fdf4,#e8f9ef)}.run-summary-pill-losses{border-color:#fca5a5;background:linear-gradient(180deg,#fef2f2,#fdecec)}.run-summary-pill-label{font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.03em;grid-column:1 / 2}.run-summary-pill-value{font-size:16px;line-height:1.1;font-weight:700;color:#1f2937;grid-column:2 / 3;justify-self:end}.run-summary-pill-sub{grid-column:1 / 3;justify-self:end;font-size:11px;color:#64748b}.run-summary-symbol-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.run-summary-symbol-pill{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;column-gap:8px;padding:8px 10px;border-radius:9px;border:1px solid #d8deea;background:#fbfcff}.run-summary-symbol-head{display:flex;align-items:center;justify-content:flex-start}.run-summary-symbol-code{font-size:13px;font-weight:700;color:#334155;letter-spacing:.01em}.run-summary-symbol-meta{font-size:12px;color:#64748b;font-variant-numeric:tabular-nums}.run-summary-symbol-total{font-size:14px;font-weight:700;color:#334155;font-variant-numeric:tabular-nums}.run-summary-symbol-breakdown{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto auto auto;gap:8px;row-gap:2px;border-left:1px dashed #c6d1e3;padding-left:12px;margin-left:2px}.run-summary-symbol-col-head{font-size:11px;line-height:1.1;text-transform:uppercase;letter-spacing:.03em;color:#64748b}.run-summary-symbol-col-count{font-size:13px;line-height:1.15;color:#475569;font-variant-numeric:tabular-nums}.run-summary-symbol-col-money{font-size:13px;line-height:1.15;font-weight:700;color:#334155;font-variant-numeric:tabular-nums}.backtest-market-controls{margin-bottom:18px}.backtest-main-chart-card{padding:10px 12px 12px}.backtest-chart-wrap{height:420px}.backtest-tooltip{background:#fff;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;box-shadow:0 4px 14px #0f172a1f}.backtest-tooltip-title{margin-bottom:6px;font-weight:700}.backtest-tooltip-row{color:#334155;font-size:13px;line-height:1.3}.backtest-tooltip-sep{margin:6px 0;border-top:1px dashed #cbd5e1}.backtest-deals-table{min-width:1180px}.backtest-deals-table td{vertical-align:middle;text-align:center}.controls-row{display:grid;grid-template-columns:92px 92px 54px 54px minmax(300px,1fr) 96px;gap:12px;align-items:center}.controls-row select,.controls-row button,.open-market-link{border:1px solid #c6d1e3;background:linear-gradient(180deg,#fff,#f5f8fd);border-radius:12px;color:var(--text-color);font-size:16px;height:46px;padding:0 12px;box-shadow:0 2px 8px #1c25380f}.controls-row button{cursor:pointer;font-size:26px;font-weight:700;line-height:1}.open-market-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-weight:600}.controls-row select:hover,.controls-row button:hover,.open-market-link:hover{border-color:#9db0cf}.controls-row button:disabled{cursor:not-allowed;opacity:.45}.open-market-link.disabled{pointer-events:none;opacity:.45}.market-select{padding:0 12px}.row{display:flex;gap:18px;flex-wrap:wrap}.stats{padding:8px 10px}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:8px;max-width:1360px;margin:0 auto}.stat-box{display:flex;flex-direction:column;gap:6px;padding:8px 10px;min-height:92px;border-radius:10px;border:1px solid var(--border-color);background:#fff}.stat-box-stack{gap:8px;justify-content:center}.stack-item{display:flex;flex-direction:column;gap:1px}.stack-item-inline{display:flex;align-items:center;gap:8px}.stack-item-split{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:8px}.stack-item-split .value{justify-self:end;text-align:right}.stack-item-split .subvalue{grid-column:2;justify-self:end;text-align:right}.stat-box-updown .value{font-size:clamp(18px,1.9vw,30px);line-height:1.1;font-weight:700}.stat-box-updown .stack-item-inline{width:100%;flex-direction:row;justify-content:space-between;align-items:center;gap:10px}.stat-box-updown .label{font-size:15px;font-weight:700;line-height:1;letter-spacing:.03em;color:#64748b}.stat-box-updown .stack-item+.stack-item{margin-top:6px}.stack-item+.stack-item{padding-top:6px;border-top:1px dashed var(--border-color)}.label{font-size:12px;color:var(--muted-text);text-transform:uppercase;letter-spacing:.04em}.value{font-size:clamp(18px,1.55vw,34px);line-height:1.15;font-weight:700}.subvalue{font-size:12px;color:var(--muted-text)}.stat-box-end{align-items:center;justify-content:center;text-align:center;min-height:92px}.stat-box-end .label{font-size:13px}.end-value{font-size:clamp(36px,4vw,64px);line-height:1;font-weight:800}.diff-positive{color:var(--up-color)}.diff-negative{color:var(--down-color)}.up-value{color:var(--up-color)}.down-value{color:var(--down-color)}.spot-value{color:var(--spot-color)}.chart{padding:10px 12px 14px}.chart-wrap{width:100%;height:420px}.chart-wrap-volume{width:100%;height:150px;margin-top:10px}.volume-panels{display:grid;grid-template-columns:1fr;gap:8px}.chart-market-trades{margin-top:12px;border:1px solid var(--border-color);border-radius:12px;overflow:hidden;background:#fff}.chart-market-trades-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:linear-gradient(180deg,#f7f9fd,#edf2fa);border-bottom:1px solid var(--border-color)}.chart-market-trades-head h3{margin:0;font-size:14px;color:#334155;letter-spacing:.01em}.chart-market-trades-head span{font-size:12px;color:var(--muted-text);font-weight:600}.chart-market-trades-scroll{max-height:320px}.chart-market-trades-table{min-width:980px}.chart-market-trades-table th,.chart-market-trades-table td{text-align:center;vertical-align:middle}.chart-market-trades-table td{padding-top:8px;padding-bottom:8px}.chart-market-trades-table .cell-center{min-height:50px;display:flex;align-items:center;justify-content:center}.chart-market-trades-table .kv-rows,.chart-market-trades-table .kv-row{align-items:center;justify-content:center}.chart-market-trades-table .kv-rows{min-height:50px}.chart-market-trades-table .kv-label,.chart-market-trades-table .kv-value{text-align:center}.chart-market-trades-table .outcome-side,.chart-market-trades-table .result-chip{margin-left:auto;margin-right:auto}.deals-page .deals-table td{vertical-align:middle}.deals-page .deals-table .cell-center{min-height:50px;display:flex;align-items:center;justify-content:center}.kv-rows.compact{gap:2px}.kv-row-inline{justify-content:center}.depth-accordion{margin-top:12px;border:1px solid var(--border-color);border-radius:12px;background:#fff;overflow:hidden}.depth-accordion-toggle{width:100%;border:0;border-bottom:1px solid var(--border-color);background:linear-gradient(180deg,#f7f9fd,#edf2fa);color:#334155;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:700;cursor:pointer}.depth-toggle-icon{font-size:18px;line-height:1;transition:transform .15s ease}.depth-toggle-icon.expanded{transform:rotate(180deg)}.depth-accordion .volume-panels{padding:8px 10px 12px}.volume-title{font-size:12px;color:var(--muted-text);margin:2px 0 4px;text-transform:uppercase;letter-spacing:.03em}.placeholder{min-height:64px;display:flex;align-items:center;justify-content:center;color:var(--muted-text);font-size:15px}.placeholder.error{color:#b91c1c}.deals-page{padding-top:12px}.deals-stats-grid{padding:12px;display:grid;gap:10px;grid-template-columns:repeat(5,minmax(140px,1fr))}.deals-pnl-chart-card{padding:8px 12px 10px}.deals-pnl-chart-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:2px 2px 6px}.deals-pnl-chart-total{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}.deals-pnl-chart-wrap{width:100%;height:140px}.deal-stat-box{background:#fff;border:1px solid var(--border-color);border-radius:10px;padding:10px 12px;min-height:88px;display:flex;flex-direction:column;justify-content:center;gap:6px}.deal-stat-box .value{font-size:clamp(20px,1.9vw,32px)}.deal-refresh-btn{border:1px solid #0f172a;border-radius:10px;background:#0f172a;color:#fff;font-size:14px;font-weight:700;padding:10px 12px;cursor:pointer}.deal-refresh-btn:disabled{opacity:.6;cursor:not-allowed}.deal-stat-box-refresh{justify-content:center;align-items:center}.deals-filters-card{padding:14px}.deals-filters-main{display:flex;align-items:flex-start;gap:18px}.filters-inputs-col{display:flex;gap:10px;align-items:flex-end;width:max-content;min-width:0;flex:0 0 auto;border:1px solid #c9d2e2;border-radius:14px;padding:8px 10px;background:linear-gradient(180deg,#f9fbff,#f3f6fc)}.filters-chip-stack{display:flex;flex-direction:column;gap:8px;min-width:0;border:1px solid #c9d2e2;border-radius:14px;padding:10px 12px;background:linear-gradient(180deg,#fbfdff,#f4f7fd)}.filters-actions-col{margin-left:auto;display:flex;align-items:flex-start}.filter-group{display:flex;flex-direction:column;gap:5px}.filter-label{font-size:12px;color:var(--muted-text);font-weight:600}.chip-group{display:flex;gap:6px;flex-wrap:wrap}.filter-group-top{min-width:0;width:250px}.filter-row-group{flex-direction:row;align-items:center;gap:10px}.chip-btn,.reset-btn{border:1px solid var(--border-color);border-radius:999px;background:#fff;color:var(--text-color);padding:6px 12px;cursor:pointer;font-weight:600;font-size:13px}.reset-btn{min-height:38px}.reset-btn-danger{border-color:#fca5a5;color:#b91c1c;background:linear-gradient(180deg,#fff5f5,#ffeaea);box-shadow:0 2px 10px #b91c1c1f}.reset-btn-danger:hover{border-color:#f87171;background:linear-gradient(180deg,#ffecec,#ffdfdf)}.date-input{border:1px solid var(--border-color);border-radius:10px;background:#fff;color:var(--text-color);padding:8px 10px;font-size:14px;min-height:38px}.text-input{border:1px solid var(--border-color);border-radius:10px;background:#fff;color:var(--text-color);padding:8px 10px;font-size:14px;min-height:38px;min-width:220px}.nav-arrows{display:flex;gap:6px;margin-top:2px}.nav-arrow-btn{width:32px;height:30px;border-radius:9px;border:1px solid var(--border-color);background:linear-gradient(180deg,#fff,#f4f6fb);color:#1f2a44;cursor:pointer;font-size:22px;line-height:1;display:inline-flex;align-items:center;justify-content:center;padding:0;box-shadow:0 2px 8px #1c253814}.nav-arrow-btn:disabled{opacity:.35;cursor:not-allowed;box-shadow:none}.nav-arrow-btn:not(:disabled):hover{border-color:#94a3b8;transform:translateY(-1px)}.chip-btn.active{background:#0f172a;color:#fff;border-color:#0f172a}.deals-table-card{padding:0;overflow:hidden}.deals-table-scroll{max-height:65vh;overflow:auto}.deals-table{width:100%;min-width:1140px;table-layout:fixed;border-collapse:separate;border-spacing:0}.deals-table th,.deals-table td{padding:10px 8px;text-align:left;border-bottom:1px solid #e6ebf4;vertical-align:top;font-size:14px}.deals-table thead th{position:sticky;top:0;background:#f2f4f9;z-index:1;color:var(--muted-text);font-size:12px;text-transform:uppercase;letter-spacing:.03em;text-align:center}.backtest-history-page{display:grid;gap:14px;min-width:0;height:calc(100vh - 78px);min-height:0;padding-top:12px}.backtest-history-card{padding:14px;overflow:hidden;display:flex;flex-direction:column;min-height:0}.backtest-history-controls{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:10px}.backtest-history-search-field{min-width:min(420px,100%)}.backtest-history-refresh-btn{align-self:end;height:40px;padding:9px 14px}.backtest-history-scroll{overflow:auto;flex:1;min-height:0;border:1px solid #d7deec;border-radius:12px;background:#fff}.backtest-history-table{width:max-content;min-width:100%;border-collapse:collapse}.backtest-history-table>thead>tr>th,.backtest-history-table>tbody>tr>td{border-bottom:1px solid #e3e8f2;border-right:1px solid #eef2f8;padding:11px 13px;font-size:14px;white-space:nowrap;color:#1e293b}.backtest-history-table>tbody>tr>td.positive{color:var(--up-color)}.backtest-history-table>tbody>tr>td.negative{color:var(--down-color)}.backtest-history-table>thead>tr>th{position:sticky;top:0;z-index:2;background:#f6f9ff;color:#475569;text-transform:uppercase;letter-spacing:.04em;font-size:13px}.table-sort-btn{border:0;background:transparent;color:inherit;font:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer;padding:0}.backtest-history-table>thead>tr>th:last-child,.backtest-history-table>tbody>tr>td:last-child{border-right:none}.backtest-history-table>tbody>tr.backtest-history-row:hover>td{background:#f8fbff}.backtest-history-row{cursor:pointer}.backtest-history-row.expanded>td{background:#f8fbff}.backtest-history-row .kv-label{font-size:13px}.backtest-history-row .kv-value{font-size:15px;font-weight:600}.backtest-history-row .stat-group{gap:5px}.backtest-history-row .stat-group-label,.backtest-history-row .stat-count,.backtest-history-row .stat-money{font-size:14px}.backtest-retry-btn{border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#334155;font-size:12px;font-weight:600;line-height:1;padding:5px 10px;cursor:pointer}.backtest-retry-btn:hover{border-color:#94a3b8;background:#f8fafc}.backtest-row-actions{gap:8px}.backtest-delete-btn{border:1px solid #fecaca;border-radius:999px;background:#fff5f5;color:#b91c1c;font-size:12px;font-weight:700;line-height:1;padding:5px 10px;min-width:30px;cursor:pointer}.backtest-delete-btn:hover{background:#fee2e2;border-color:#fca5a5}.backtest-delete-btn:disabled{opacity:.6;cursor:default}.backtest-history-deals-wrap{border:1px solid #dbe4f0;border-radius:12px;background:#f8fbff}.backtest-history-deals-panel{margin-top:10px}.backtest-history-deals-panel-title{font-size:14px;font-weight:700;color:#334155;margin:0 0 8px;padding:0 2px}.backtest-history-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a61;display:grid;place-items:center;z-index:50;padding:20px}.backtest-history-modal{width:min(1500px,calc(100vw - 40px));max-height:calc(100vh - 40px);background:#fff;border:1px solid #dbe4f0;border-radius:14px;box-shadow:0 24px 64px #0f172a38;padding:12px;display:flex;flex-direction:column;gap:10px}.backtest-history-modal-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.backtest-history-modal-nav{display:flex;align-items:center;gap:8px}.backtest-history-modal-nav-btn{border:1px solid #cbd5e1;border-radius:10px;width:36px;height:34px;background:#fff;color:#334155;font-size:18px;line-height:1;cursor:pointer}.backtest-history-modal-nav-btn:disabled{opacity:.5;cursor:default}.backtest-history-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:10px}.backtest-history-summary-card{border:1px solid #d7deec;border-radius:12px;background:#f8fbff;padding:10px 12px;display:grid;gap:6px}.backtest-history-summary-card .backtest-history-summary-label{color:#64748b;font-weight:700;font-size:13px;letter-spacing:.02em}.backtest-history-summary-card .backtest-history-summary-value{font-size:22px;font-weight:800;color:#0f172a}.backtest-history-summary-card .backtest-history-summary-value.neutral{color:#0f172a}.backtest-history-summary-card .backtest-history-summary-sub{font-size:14px;color:#64748b;font-weight:700}.backtest-history-summary-card.positive .backtest-history-summary-value,.backtest-history-summary-card.positive .backtest-history-summary-sub{color:var(--up-color)}.backtest-history-summary-card.negative .backtest-history-summary-value,.backtest-history-summary-card.negative .backtest-history-summary-sub{color:var(--down-color)}.backtest-history-pnl-card{border:1px solid #d7deec;border-radius:12px;background:#f8fbff;padding:10px 12px;display:grid;gap:8px}.backtest-history-pnl-head{display:flex;align-items:center;justify-content:space-between;font-weight:700;color:#64748b}.backtest-history-pnl-chart{height:210px}.backtest-history-modal-filters{border:1px solid #c7d2e6;border-radius:14px;background:#f8fbff;padding:12px;display:grid;gap:10px}.backtest-history-modal-filter-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.backtest-history-modal-filter-label{min-width:64px;font-weight:700;color:#64748b;font-size:14px}.backtest-history-modal-filters .chip-group{gap:8px}.backtest-history-modal-filters .chip-btn{min-width:94px}.backtest-history-modal-close{border:1px solid #cbd5e1;border-radius:10px;width:34px;height:34px;background:#fff;color:#334155;font-size:20px;line-height:1;cursor:pointer}.backtest-history-deals-scroll{max-height:430px;overflow:auto}.backtest-history-deals-table{width:100%;min-width:1180px}.cell-stack{display:flex;flex-direction:column;gap:3px}.kv-rows{display:flex;flex-direction:column;gap:4px}.kv-row{display:flex;align-items:center;gap:8px}.kv-label{text-transform:uppercase;font-weight:700;letter-spacing:.02em}.kv-value{font-variant-numeric:tabular-nums}.col-index{width:40px}.col-action{width:72px}.col-run,.col-date{width:118px}.col-time{width:128px}.col-price{width:108px}.col-event{width:230px;text-align:center}.col-event .cell-stack{align-items:center;text-align:center}.col-center{text-align:center!important}.col-run .table-link-btn{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.outcome-side{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:4px 10px;border-radius:999px;font-weight:700;font-size:12px;border:1px solid transparent}.outcome-side.up{color:#166534;background:#ecfdf3;border-color:#86efac}.outcome-side.down{color:#991b1b;background:#fff1f2;border-color:#fda4af}.outcome-side.neutral{color:#475569;background:#f8fafc;border-color:#cbd5e1}.muted{color:var(--muted-text);font-size:12px}.result-chip{border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700;border:1px solid var(--border-color)}.result-chip.won{border-color:#a7f3d0;color:#047857;background:#ecfdf5}.result-chip.lost{border-color:#fecaca;color:#b91c1c;background:#fef2f2}.result-chip.even{border-color:#cbd5e1;color:#475569;background:#f8fafc}.row-result-won{background:#f0fdf4}.row-result-lost{background:#fef2f2}.table-loader{padding:10px;text-align:center;color:var(--muted-text)}.table-link-btn{border:0;padding:0;background:transparent;color:#1d4ed8;cursor:pointer;text-align:left;font:inherit;line-height:inherit}.table-link-btn:hover{text-decoration:underline}.deal-row-sync-btn{border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#334155;font-size:12px;font-weight:700;line-height:1;padding:5px 10px;cursor:pointer}.deal-row-sync-btn:hover{border-color:#94a3b8;background:#f8fafc}.deal-row-sync-btn:disabled{opacity:.65;cursor:wait}.positive{color:var(--up-color)}.negative{color:var(--down-color)}.auth-gate{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#eef2ff,#e0f2fe,#f8fafc);padding:20px}.auth-card{width:min(420px,100%);background:#fff;border:1px solid #dbeafe;border-radius:14px;padding:24px;box-shadow:0 20px 48px #0f172a14;display:grid;gap:12px}.auth-card h1{margin:0;font-size:1.25rem}.auth-card p{margin:0;color:#475569}.auth-input{border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-size:14px}.auth-submit{border:0;border-radius:10px;padding:10px 12px;background:#1d4ed8;color:#fff;cursor:pointer;font-weight:600}.auth-submit:disabled{opacity:.65;cursor:default}.auth-error{color:#b91c1c}.auth-logout{border:0;border-radius:10px;padding:8px 12px;background:#0f172a;color:#fff;cursor:pointer}@media (max-width: 1024px){.tabs-header{padding:10px 10px 0}.tabs-segment{width:100%}.tab-btn{flex:1 1 auto;min-width:0}.controls-row{grid-template-columns:1fr 1fr 52px 52px 88px}.market-select{grid-column:1 / 5}.stats-grid{grid-template-columns:1fr;max-width:none}.chart-wrap{height:360px}.chart-wrap-volume{height:140px}.deals-stats-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.backtest-run-controls-grid{grid-template-columns:1fr}.strategy-section-base .strategy-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.strategy-section-base .strategy-field-compact input,.strategy-section-base .strategy-field-compact select,.strategy-section-base .strategy-field-compact textarea{max-width:none}.run-summary-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.run-summary-symbol-row{grid-template-columns:1fr}.backtest-chart-wrap{height:360px}.deals-pnl-chart-wrap{height:130px}.deals-filters-main{flex-wrap:wrap}.filters-inputs-col,.filters-chip-stack{min-width:100%}.filters-actions-col{margin-left:0}}@media (max-width: 640px){.page{padding:10px}.stats-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.deals-stats-grid{grid-template-columns:1fr 1fr}.backtest-chart-wrap{height:320px}.backtest-run-controls{padding:10px}.run-summary-pill-value{font-size:15px}.run-summary-symbol-breakdown{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:2px;column-gap:6px;padding-left:10px}.deals-pnl-chart-head{flex-direction:column;align-items:flex-start;gap:2px}.deals-pnl-chart-wrap{height:120px}.filters-inputs-col{flex-direction:column;align-items:stretch;min-width:100%}.filter-group-top{min-width:100%}.filter-row-group{flex-direction:column;align-items:flex-start}}.backtest-run-page .form-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));align-items:end}.backtest-run-page .strategy-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));align-items:end;row-gap:14px}.backtest-run-page .strategy-section-base .strategy-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.backtest-run-page .strategy-section-base .strategy-field-compact input,.backtest-run-page .strategy-section-base .strategy-field-compact select,.backtest-run-page .strategy-section-base .strategy-field-compact textarea{max-width:none}.backtest-run-page .field{display:flex;flex-direction:column;justify-content:flex-end;height:100%;gap:0}.backtest-run-page .field>.field-title{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;text-transform:uppercase;color:#64748b;margin-bottom:6px;line-height:1.25}.backtest-run-page .field .field-title-text{line-height:1.25}.backtest-run-page .field .field-help,.backtest-run-page .strategy-section-title .field-help{display:inline-flex;width:15px;height:15px;border:1px solid #94a3b8;border-radius:999px;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#475569;cursor:help;-webkit-user-select:none;user-select:none;background:#f8fafc}.backtest-run-page .field input:not([type=checkbox]),.backtest-run-page .field select{height:38px}.backtest-run-page .field:has(input[type=checkbox]){flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;grid-column:1 / -1;padding:6px 0 4px}.backtest-run-page .field:has(input[type=checkbox])>.field-title{margin-bottom:0}.backtest-run-page .field input[type=checkbox]{margin:0;width:20px;height:20px;accent-color:#0f172a;cursor:pointer}.backtest-run-page .strategy-grid .field:has(textarea){grid-column:1 / -1;max-width:560px}.backtest-run-page .field textarea{resize:vertical;min-height:48px}.backtest-run-page .field.symbol-map-field{grid-column:1 / -1;max-width:none}.backtest-run-page .strategy-grid .field.strategy-field-value-compact{max-width:190px}.backtest-run-page .strategy-grid .field.strategy-field-value-compact input[type=number]{width:140px;max-width:100%}.backtest-run-page .symbol-map-grid{display:flex;flex-wrap:wrap;gap:10px}.backtest-run-page .symbol-map-item{display:grid;grid-template-columns:auto minmax(58px,70px);align-items:center;justify-content:start;gap:4px;flex:0 0 auto}.backtest-run-page .symbol-map-item span{margin:0;text-align:left;font-size:12px;color:#334155}.backtest-run-page .symbol-map-item input{height:28px;padding:3px 6px}@media (max-width: 720px){.backtest-run-page .symbol-map-grid{gap:8px}}.stat-group{display:flex;flex-direction:column;gap:4px;min-width:130px}.stat-group-row{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.stat-group-label{color:#64748b;font-size:.85em;text-transform:uppercase;letter-spacing:.05em}.stat-group-label.positive{color:var(--up-color);opacity:.85}.stat-group-label.negative{color:var(--down-color);opacity:.85}.stat-group-value{font-weight:500;display:flex;gap:4px;align-items:baseline}.stat-group-value .stat-count{min-width:28px;text-align:right;font-size:.9em;color:#475569}.stat-group-value .stat-money{min-width:68px;text-align:right;font-weight:600}.backtest-history-table tr.row-positive td{background-color:#16a34a09}.backtest-history-table tr.row-negative td{background-color:#ef444409}*,*:before,*:after{box-sizing:border-box}html,body,#root{margin:0;padding:0;min-height:100%}body{font-family:IBM Plex Sans,Segoe UI,sans-serif}
