@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=Sora:wght@400;500;600;700&display=swap');
:root{--navy:#0b1729;--navy2:#132238;--ink:#172033;--muted:#718096;--line:#e6ebf2;--bg:#f4f7fb;--card:#fff;--blue:#3563e9;--cyan:#13a9bf;--green:#16a36a;--red:#e35353;--amber:#e69b28;--shadow:0 10px 35px rgba(24,39,75,.07)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);font-family:'DM Sans',system-ui,sans-serif;background:var(--bg)}button,input,select{font:inherit}button{cursor:pointer}.eyebrow{font-size:11px;letter-spacing:.18em;font-weight:800;color:#7e8da3;margin:0 0 9px}.muted{color:var(--muted)}
.logo-mark{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#386bf0,#16a7c6);font:800 28px Manrope;box-shadow:0 12px 30px #136da34d}.logo-mark.small{width:37px;height:37px;border-radius:11px;font-size:19px;box-shadow:none}
.auth-body{min-height:100vh;background:#091426;overflow:hidden}.auth-shell{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr;position:relative;z-index:2}.auth-brand{padding:11vh 8vw;color:#fff;display:flex;flex-direction:column;justify-content:center}.auth-brand .eyebrow{color:#5bc5db;margin-top:25px}.auth-brand h1{font:700 clamp(42px,4.5vw,68px)/1.08 Manrope;margin:5px 0 22px;letter-spacing:-.04em}.auth-brand h1 span{color:#4fc6db}.auth-copy{max-width:570px;font-size:17px;line-height:1.7;color:#9cacc0}.auth-points{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:50px;max-width:720px}.auth-points div{display:flex;gap:12px}.auth-points i{font:600 12px Manrope;color:#4fc6db;border-top:1px solid #296980;padding-top:5px}.auth-points span{display:flex;flex-direction:column}.auth-points b{font-size:13px}.auth-points small{font-size:11px;color:#73859d;margin-top:4px;line-height:1.4}.login-card{background:#fff;margin:6vh 5vw 6vh 0;border-radius:28px;padding:clamp(40px,5vw,76px);display:flex;flex-direction:column;justify-content:center;box-shadow:0 30px 90px #0004}.login-card h2{font:800 34px Manrope;margin:0 0 6px;letter-spacing:-.03em}.login-form{margin-top:30px}.login-form label,.stack-form label,.form-grid label{display:flex;flex-direction:column;gap:8px;font-weight:600;font-size:13px;color:#39465a}.login-form input,.stack-form input,.form-grid input,.form-grid select{width:100%;height:49px;border:1px solid #dce3ec;border-radius:10px;padding:0 14px;outline:none;color:var(--ink);background:#fbfcfe}.login-form input:focus,.stack-form input:focus,.form-grid input:focus,.form-grid select:focus{border-color:#4b72e8;box-shadow:0 0 0 3px #3563e912}.login-form label+label{margin-top:18px}.btn{height:42px;border-radius:9px;border:0;padding:0 18px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.2s}.btn:hover{transform:translateY(-1px)}.btn:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn-wide{width:100%;height:50px}.login-form .btn{margin-top:25px}.btn-primary{background:linear-gradient(135deg,#3968eb,#3156d2);color:#fff;box-shadow:0 8px 22px #3563e92a}.btn-ghost{background:#fff;border:1px solid #dfe5ed;color:#465368}.btn-success{background:#ddf8eb;color:#08784a}.btn-dark{background:#e9edf3;color:#243249}.btn-danger{background:#fff0f0;color:#cb3939;border:1px solid #ffd9d9}.secure-note{text-align:center;margin-top:28px;font-size:11px;color:#9aa6b5}.secure-note span{color:#25b97b}.mobile-logo{display:none}.auth-orb{position:fixed;border-radius:50%;filter:blur(2px);opacity:.3}.orb-one{width:500px;height:500px;background:#075b84;left:-250px;bottom:-250px}.orb-two{width:300px;height:300px;background:#173b83;top:-150px;left:45%}.alert{padding:13px 16px;border-radius:9px;font-size:13px;margin:15px 0}.alert.error{background:#fff0f0;color:#b83a3a;border:1px solid #ffdada}.alert.success{background:#ebfbf3;color:#08784a;border:1px solid #ccf4df}.alert.dismissible{display:flex;justify-content:space-between}.alert.dismissible button{border:0;background:none;color:inherit;font-size:18px}
.app-body{min-height:100vh}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:20}.market-clock{display:flex;align-items:center;gap:11px}.market-clock b{font-size:13px;display:block}.market-clock small{font-size:10px;color:#8794a6}.pulse-dot{width:9px;height:9px;border-radius:50%;background:#28b77b;box-shadow:0 0 0 5px #28b77b18}.top-actions{display:flex;gap:10px;align-items:center}.connection-pill{font-size:11px;font-weight:700;padding:8px 11px;border-radius:20px;background:#eafaf2;color:#168457}.connection-pill i{width:6px;height:6px;border-radius:50%;background:#21ad70;display:inline-block;margin-right:5px}.connection-pill.offline{background:#f3f5f8;color:#8793a4}.connection-pill.offline i{background:#a9b2bf}.broker-dot{width:15px;height:15px;border:4px solid #fff;border-radius:50%}.workspace{padding:31px 34px 60px;max-width:1600px;margin:auto}.page-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px}.page-title h1{font:800 27px Manrope;letter-spacing:-.03em;margin:0 0 4px}.page-title>div>p:last-child{font-size:13px;color:#8491a3;margin:0}.strategy-status{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 15px;box-shadow:var(--shadow)}.strategy-status>span{width:10px;height:10px;border-radius:50%;background:#aab4c1}.strategy-status>span.running{background:#23b979;box-shadow:0 0 0 5px #23b97918}.strategy-status small{font-size:8px;color:#93a0af;font-weight:800;letter-spacing:.12em;display:block}.strategy-status b{font-size:12px;text-transform:capitalize}.index-grid{display:grid;grid-template-columns:1.2fr 1.2fr .8fr .8fr;gap:16px}.index-card,.metric-card,.control-card,.content-card,.report-filter,.report-metrics article{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.index-card{min-height:130px;padding:23px;display:grid;grid-template-columns:48px 1fr 86px;gap:16px;align-items:center;overflow:hidden}.card-icon{width:45px;height:45px;border-radius:12px;background:#e9f0ff;color:#3867e8;display:grid;place-items:center;font:800 18px Manrope}.index-card small,.metric-card small{font-size:9px;letter-spacing:.14em;color:#8a97a8;font-weight:800;display:block}.index-card strong{font:700 25px Manrope;display:block;margin:4px 0}.index-card span{font-size:10px;color:#94a0af}.index-card span.positive,.positive{color:var(--green)!important}.index-card span.negative,.negative{color:var(--red)!important}.metric-card{padding:25px;display:flex;justify-content:center;flex-direction:column}.metric-card strong{font:700 23px Manrope;margin:10px 0 5px}.metric-card span{font-size:10px;color:#98a3b2}.control-card{margin-top:17px;padding:18px 22px;display:flex;align-items:center;gap:20px}.control-copy{display:flex;align-items:center;gap:14px;flex:1}.control-icon{width:42px;height:42px;background:#eef3ff;border-radius:10px;display:grid;place-items:center;color:#426ae1;font-size:20px}.control-copy h3,.section-head h3{font:700 15px Manrope;margin:0 0 4px}.control-copy p,.section-head p{font-size:11px;color:#8a96a6;margin:0}.mode-select{display:flex;background:#f0f3f7;border-radius:8px;padding:3px}.mode-select button{border:0;background:none;height:32px;padding:0 14px;border-radius:6px;font-size:11px;font-weight:700;color:#8793a2}.mode-select button.active{background:#fff;color:#315bdc;box-shadow:0 2px 8px #192d4e16}.control-buttons{display:flex;gap:8px}.content-card{margin-top:17px}.section-head{padding:19px 22px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.count-badge{font-size:10px;color:#728196;background:#f2f5f8;border-radius:15px;padding:6px 10px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:12px}th{height:42px;background:#fafbfd;color:#8b98a8;font-size:9px;letter-spacing:.08em;text-transform:uppercase;text-align:left;padding:0 22px}td{height:52px;border-top:1px solid #edf0f4;padding:0 22px;color:#4b586b}td b{color:#1c293d}.right{text-align:right}.empty-row td{text-align:center;height:110px;color:#9ba6b3}.tabs{height:55px;display:flex;align-items:flex-end;padding:0 21px;border-bottom:1px solid var(--line);gap:25px}.tabs button{height:55px;border:0;background:none;font-size:12px;color:#8290a2;font-weight:700;border-bottom:2px solid transparent}.tabs button.active{color:#315de0;border-color:#3563e9}.tabs em{font-style:normal;font-size:9px;background:#eff2f6;border-radius:10px;padding:3px 6px;margin-left:4px}.tab-panel{display:none}.tab-panel.active{display:block}.status-chip,.side-chip{font-size:9px;font-weight:800;border-radius:12px;padding:4px 7px;text-transform:uppercase}.status-chip.complete{background:#e9f9f1;color:#148054}.status-chip.rejected,.status-chip.cancelled{background:#fff0f0;color:#c74444}.side-chip.buy{color:#177f58;background:#e8f8f0}.side-chip.sell{color:#cf4444;background:#fff0f0}.logs-panel{padding:5px 22px 15px}.log-item{display:grid;grid-template-columns:75px 58px 1fr;gap:12px;padding:12px 0;border-bottom:1px solid #edf0f4;font-size:11px}.log-time{color:#98a3b0}.log-level{font-size:8px;font-weight:800;letter-spacing:.08em;color:#25835d}.log-level.error{color:#d04c4c}.log-level.warning{color:#d98e24}.log-item p{margin:0;color:#4e5c6f}.log-details{display:block;color:#8592a3;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:900px}
.modal-backdrop{position:fixed;inset:0;background:#091426a6;backdrop-filter:blur(5px);z-index:100;display:none;align-items:center;justify-content:center;padding:20px}.modal-backdrop.open{display:flex}.modal{background:#fff;border-radius:19px;box-shadow:0 30px 90px #0005;position:relative;max-height:92vh;overflow-y:auto}.broker-modal{width:min(470px,100%);padding:38px;text-align:center}.modal-close{position:absolute;right:18px;top:15px;border:0;background:#f0f3f7;border-radius:50%;width:30px;height:30px;color:#778397;font-size:18px}.modal-brand{width:58px;height:58px;margin:0 auto 18px;border-radius:15px;display:grid;place-items:center;color:#fff;font:800 27px Manrope}.modal-brand.delta{background:#ef6c3e}.modal h2{font:800 25px Manrope;margin:0 0 8px}.modal-copy{font-size:12px;line-height:1.6;color:#7c899b;margin:0 auto 20px;max-width:360px}.callback-box{position:relative;text-align:left;background:#f4f7fb;border:1px solid #e2e8f0;padding:12px;border-radius:9px;margin-bottom:20px}.callback-box small{font-size:8px;display:block;color:#8290a2;font-weight:800;letter-spacing:.08em}.callback-box code{font-size:10px;color:#40506a;word-break:break-all}.callback-box button{position:absolute;right:7px;top:7px;border:0;background:#fff;border-radius:5px;font-size:9px;padding:5px}.stack-form{text-align:left}.stack-form label+label{margin-top:14px}.stack-form .btn{margin-top:20px}.init-graphic{display:flex;align-items:center;justify-content:center;gap:16px;margin:27px}.init-graphic span{width:50px;height:50px;border-radius:14px;background:#245cdc;color:#fff;display:grid;place-items:center;font:800 21px Manrope}.init-graphic i{color:#8c98a7}.broker-modal h3{font:700 17px Manrope}.connected-account{font-size:11px;background:#f4f8f7;color:#4f6b64;padding:10px;border-radius:8px;margin-bottom:16px}.link-button{border:0;background:none;color:#526fe2;font-size:11px;font-weight:700;margin-top:14px}.settings-modal{width:min(870px,100%)}.settings-head{padding:27px 30px 20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}.settings-head h2{margin:0}.settings-head p:last-child{font-size:11px;color:#8794a5;margin:5px 0 0}.setting-section{padding:22px 30px;border-bottom:1px solid var(--line)}.setting-section h3{font:700 13px Manrope;margin:0 0 16px}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.form-grid input,.form-grid select{height:42px}.settings-actions{padding:18px 30px;display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line)}.toast-stack{position:fixed;right:22px;bottom:22px;z-index:200;display:flex;flex-direction:column;gap:10px}.toast{width:310px;background:#142238;color:#fff;padding:14px 16px;border-radius:10px;box-shadow:0 15px 40px #0003;font-size:12px;animation:slidein .25s}.toast.error{border-left:4px solid #ed5959}.toast.success{border-left:4px solid #27b879}@keyframes slidein{from{transform:translateX(20px);opacity:0}}
.report-filter{padding:16px 20px;display:flex;justify-content:space-between;align-items:center}.report-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:17px}.report-metrics article{padding:21px}.report-metrics small{font-size:9px;letter-spacing:.1em;color:#8895a6;font-weight:800}.report-metrics strong{font:700 23px Manrope;display:block;margin:9px 0 3px}.report-metrics span{font-size:10px;color:#9ba6b4}
@media(max-width:1100px){.index-grid{grid-template-columns:1fr 1fr}.auth-points{grid-template-columns:1fr}.auth-points div:nth-child(n+2){display:none}.control-card{flex-wrap:wrap}.control-copy{min-width:50%}}
@media(max-width:760px){.auth-shell{display:block;padding:18px}.auth-brand{display:none}.login-card{min-height:calc(100vh - 36px);margin:0;border-radius:20px;padding:34px 26px}.mobile-logo{display:flex;align-items:center;gap:10px;font:700 17px Manrope;margin-bottom:45px}.mobile-logo .logo-mark{width:38px;height:38px;border-radius:11px;font-size:18px}.app-content{margin:0}.topbar{padding:0 15px;height:64px}.market-clock{display:none}.top-actions .btn-ghost{display:none}.connection-pill{display:none}.workspace{padding:21px 14px 45px}.page-title{align-items:flex-start}.page-title h1{font-size:23px}.strategy-status{padding:8px 10px}.index-grid{grid-template-columns:1fr 1fr;gap:10px}.index-card{grid-template-columns:36px 1fr;min-height:105px;padding:15px;gap:10px}.card-icon{width:35px;height:35px}.index-card strong{font-size:18px}.metric-card{padding:16px;min-height:95px}.metric-card strong{font-size:18px}.control-card{padding:16px}.control-copy{width:100%;flex-basis:100%}.mode-select{order:2}.control-buttons{order:3;flex:1}.control-buttons .btn{flex:1;padding:0 10px}.section-head{padding:16px}th,td{padding:0 14px;white-space:nowrap}.tabs{overflow-x:auto;gap:18px}.form-grid{grid-template-columns:1fr 1fr}.broker-modal{padding:30px 21px}.settings-modal{height:94vh}.setting-section{padding:20px}.settings-head{padding:22px 20px}.settings-actions{padding:14px 20px}.report-filter{align-items:stretch;gap:15px;flex-direction:column}.report-metrics{grid-template-columns:1fr 1fr;gap:10px}.reports-workspace .page-title{gap:10px}.toast{width:calc(100vw - 30px)}.toast-stack{right:15px;bottom:15px}}

.index-grid{grid-template-columns:1.2fr .8fr .8fr}
@media(max-width:1100px){.index-grid{grid-template-columns:1fr 1fr}}
@media print{.topbar,.report-filter,.page-title .btn{display:none!important}.app-content{margin:0}.workspace{padding:15px}.content-card,.report-metrics article{box-shadow:none}}
.books-head{display:flex;align-items:center;border-bottom:1px solid var(--line)}.books-head .tabs{flex:1;border-bottom:0}.book-date{display:flex;align-items:center;gap:8px;padding-right:21px;font-size:9px;color:#8491a3;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.book-date input{height:34px;border:1px solid #dce3eb;border-radius:7px;padding:0 9px;background:#fff;color:#4b586b;font-size:11px}
@media(max-width:760px){.books-head{align-items:stretch;flex-direction:column}.books-head .tabs{width:100%}.book-date{justify-content:flex-end;padding:10px 14px;border-top:1px solid var(--line)}}

.strategy-summary-grid{grid-template-columns:1.3fr repeat(4,.85fr)}
.active-signal-card{grid-template-columns:48px 1fr}
.ohlc-card{gap:9px}.ohlc-card>small{white-space:nowrap}.ohlc-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.ohlc-values>span{display:flex;min-width:0;flex-direction:column;gap:3px;padding:7px 5px;border:1px solid rgba(255,255,255,.08);border-radius:7px;background:rgba(255,255,255,.035);text-align:center}.ohlc-values small{font-size:8px;color:#9c928b}.ohlc-values b{overflow:hidden;color:#f7f3ef;font-size:10px;text-overflow:ellipsis}.ohlc-card #ohlcTimestampValue{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn[href]{text-decoration:none}.single-date-filter{gap:16px}.single-date-filter>label{display:flex;flex-direction:column;gap:6px;color:#aaa19b;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.single-date-filter input{height:38px;min-width:180px;padding:0 11px;border:1px solid var(--line);border-radius:8px;background:#292522;color:#f7f3ef}.single-date-filter>div{display:flex;gap:8px}.report-trades-card{overflow:hidden}
.strategy-control-card{display:block;padding:0}
.strategy-control-card .control-copy{padding:18px 22px 10px}
.strategy-control-card .control-copy>div{min-width:0}.strategy-control-card .control-copy h3,.strategy-control-card .control-copy p{overflow-wrap:anywhere}
.strategy-tags{display:flex;gap:10px;flex-wrap:wrap;padding:0 22px 20px}
.strategy-tags span{display:inline-flex;padding:8px 12px;border-radius:999px;background:#eef3ff;color:#3558c9;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.strategy-workbench{display:grid;grid-template-columns:minmax(0,1fr);gap:17px;margin-top:17px}
.strategy-form-card,.signal-board-card,.raw-section{overflow:hidden}
.strategy-dashboard-form{padding:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.strategy-choice-grid{padding:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.strategy-choice-card{min-width:0;border:1px solid #dfe6f0;border-radius:14px;padding:22px;background:linear-gradient(145deg,#fff,#f7f9fd);overflow:hidden}.strategy-choice-card.scalping-card{border-color:#ccece8;background:linear-gradient(145deg,#fff,#f0fbf9)}.strategy-choice-card h4{font:700 17px/1.35 Manrope;margin:7px 0 9px;color:#1d2b40;overflow-wrap:anywhere}.strategy-choice-card p{font-size:12px;line-height:1.6;color:#748196;min-height:58px;overflow-wrap:anywhere}.strategy-kicker{display:block;font-size:9px;line-height:1.4;text-transform:uppercase;letter-spacing:.13em;font-weight:800;color:#4168dc;overflow-wrap:anywhere}.scalping-card .strategy-kicker{color:#078b7d}.strategy-choice-card .strategy-tags{padding:0;gap:7px}.strategy-choice-card .strategy-tags span{max-width:100%;padding:7px 10px;white-space:normal;overflow-wrap:anywhere}.strategy-card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:18px;width:100%}.strategy-card-actions .btn{width:100%;min-width:0;padding:0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.strategy-settings-open{overflow:hidden}
@media(max-width:760px){.strategy-choice-grid{grid-template-columns:1fr;padding:16px}.strategy-choice-card{padding:18px}.strategy-choice-card p{min-height:0}.strategy-card-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.strategy-card-actions .btn{font-size:12px;padding:0 7px}}
@media(max-width:420px){.strategy-card-actions{grid-template-columns:1fr}.strategy-card-actions .btn{width:100%}}
.settings-modal{overflow-x:hidden}.settings-head{padding-right:70px}.settings-head h2,.settings-head p{overflow-wrap:anywhere}.settings-modal .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.settings-modal .form-grid label{min-width:0}.settings-modal input,.settings-modal select{min-width:0;max-width:100%;box-sizing:border-box}.settings-actions{flex-wrap:wrap}.settings-actions .btn{min-width:120px}
[data-higher-timeframe][hidden]{display:none}
.broker-form-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:20px}.stack-form .broker-form-actions .btn{margin-top:0}
@media(max-width:760px){.settings-modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.settings-modal .form-grid{grid-template-columns:1fr}.settings-actions{display:grid;grid-template-columns:1fr 1fr}.settings-actions .btn{width:100%;min-width:0;padding:0 10px}}
.strategy-dashboard-form label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;color:#39465a}
.strategy-dashboard-form input,.strategy-dashboard-form select{width:100%;height:49px;border:1px solid #dce3ec;border-radius:10px;padding:0 14px;outline:none;color:var(--ink);background:#fbfcfe}
.strategy-dashboard-form input:focus,.strategy-dashboard-form select:focus{border-color:#4b72e8;box-shadow:0 0 0 3px #3563e912}
.strategy-actions{grid-column:1/-1;display:flex;gap:10px;justify-content:flex-start}
.signal-chip{display:inline-flex;align-items:center;justify-content:center;min-width:92px;height:34px;padding:0 14px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.signal-chip.neutral{background:#eff2f6;color:#607086}
.signal-chip.buy{background:#e8f8f0;color:#177f58}
.signal-chip.sell{background:#fff0f0;color:#cf4444}
.signal-chip.error{background:#fff0f0;color:#cb3939}
.trading-books-card{overflow:hidden}
.trading-books-top{align-items:flex-start}
.activity-eyebrow{margin-bottom:8px;color:#14886e}
.trading-books-actions{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.trading-books-actions label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#617084;font-weight:700}
.trading-books-actions input{width:220px;height:42px;border:1px solid #dce3eb;border-radius:12px;padding:0 14px;background:#fff;color:#243249}
.trade-book-tabs{padding:0 22px}
.trade-book-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:18px 22px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fbfdff,#f5f9ff)}
.trade-book-stat{padding:18px;border:1px solid #e6ebf2;border-radius:16px;background:#fff}
.trade-book-stat small{display:block;font-size:10px;letter-spacing:.1em;color:#8491a3;font-weight:800;text-transform:uppercase}
.trade-book-stat strong{display:block;margin:9px 0 5px;font:800 24px Manrope;color:#1f2e45}
.trade-book-stat span{font-size:11px;color:#8a96a6}
.signal-board-grid{padding:22px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.signal-metric,.detail-tile{background:#f8fbff;border:1px solid #e6ebf2;border-radius:14px}
.signal-metric{padding:18px}
.signal-metric small,.detail-tile span{display:block;font-size:10px;letter-spacing:.1em;color:#8491a3;font-weight:800;text-transform:uppercase}
.signal-metric strong{font:800 24px Manrope;display:block;margin-top:10px}
.signal-detail-grid{padding:0 22px 22px;display:grid;grid-template-columns:1fr 1fr;gap:14px}
.detail-tile{padding:18px}
.detail-tile strong{display:block;margin:8px 0 6px;font:800 16px Manrope;color:#1f2e45}
.detail-tile small{font-size:11px;color:#8a96a6}
.raw-section .raw-output{margin:0;padding:22px;background:#0f1d33;color:#d9e5ff;min-height:260px;font-size:12px;line-height:1.6;overflow:auto}
.strategy-status b#runStatus{text-transform:none}

.strategy-body{min-height:100vh;background:radial-gradient(circle at top left,rgba(53,99,233,.18),transparent 26%),radial-gradient(circle at right center,rgba(19,169,191,.16),transparent 24%),linear-gradient(135deg,#f6f8fc 0%,#edf2fa 50%,#dfe8f6 100%)}
.strategy-shell{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:42px 0 60px}
.strategy-hero,.strategy-layout{display:grid;gap:24px}
.strategy-hero{grid-template-columns:1.35fr .75fr;margin-bottom:28px}
.hero-copy,.hero-stats,.strategy-panel,.result-panel{border-radius:28px;box-shadow:0 28px 70px rgba(24,39,75,.12)}
.hero-copy{padding:36px;background:linear-gradient(160deg,#0f1d33,#18365e);color:#fff}
.ui-version{display:inline-flex;margin-top:4px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.14);color:#d9e5ff;font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.hero-copy h1{margin:10px 0 12px;font:800 clamp(2.6rem,5vw,4.5rem)/.95 Manrope;letter-spacing:-.04em}
.hero-text{margin:0;max-width:44rem;color:rgba(255,255,255,.76);font-size:1.05rem;line-height:1.7}
.hero-stats{display:grid;gap:14px;align-content:center;padding:28px;background:linear-gradient(180deg,#ffffff,#eef5ff)}
.hero-stats span{display:inline-flex;width:fit-content;padding:11px 16px;border-radius:999px;background:#edf3ff;color:#29406a;font-size:.9rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.strategy-layout{grid-template-columns:1.02fr .98fr}
.strategy-panel{padding:30px;background:linear-gradient(160deg,#10233e,#17345a);color:#fff}
.result-panel{padding:30px;background:#fff}
.panel-topline{display:flex;justify-content:space-between;align-items:center;gap:16px}
.card-kicker{margin:0;color:#89a6ff;font-size:.75rem;letter-spacing:.18em;text-transform:uppercase;font-weight:800}
.card-kicker.success{color:#23a06a}
.strategy-panel h2,.result-panel h3{margin:14px 0 10px;font:800 2rem/1.05 Manrope;letter-spacing:-.03em}
.panel-text,.result-reason{margin:0 0 22px}
.panel-text{color:rgba(255,255,255,.74)}
.result-reason{color:#607086;line-height:1.7}
.status-pill,.signal-badge{display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border-radius:999px;font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.status-pill{background:rgba(255,255,255,.1);color:#f1f6ff}
.signal-badge{background:#eff4fb;color:#29406a}
.strategy-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.strategy-form label{display:grid;gap:8px;font-size:.92rem;color:rgba(255,255,255,.84)}
.strategy-form input{width:100%;padding:14px 16px;border:1px solid rgba(255,255,255,.16);border-radius:16px;background:rgba(255,255,255,.08);color:#fff;outline:none}
.strategy-form input::placeholder{color:rgba(255,255,255,.42)}
.launch-button{grid-column:1/-1;border:0;border-radius:18px;padding:16px 20px;background:linear-gradient(135deg,#48b6ce,#3768ea);color:#fff;font-weight:800;box-shadow:0 18px 38px rgba(53,99,233,.28)}
.launch-button:disabled{opacity:.72;cursor:wait}
.metric-grid,.trade-strip{display:grid;gap:14px}
.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 18px}
.metric-grid div,.trade-strip div,.detail-card{border:1px solid #e6ebf2;border-radius:18px;background:#f8fbff}
.metric-grid div,.trade-strip div{padding:16px}
.metric-grid span,.trade-strip span,.detail-row span{display:block;margin-bottom:8px;color:#74839a;font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.metric-grid strong,.trade-strip strong,.detail-row strong{font:800 1.15rem Manrope;color:#1d2a3f}
.trade-strip{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}
.detail-card{padding:6px 18px;margin-bottom:18px}
.detail-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0}
.detail-row+.detail-row{border-top:1px solid #e6ebf2}
.raw-output{margin:0;min-height:180px;padding:18px;border-radius:18px;background:#0f1d33;color:#d9e5ff;font-size:.84rem;line-height:1.5;overflow:auto}
@media(max-width:920px){.strategy-hero,.strategy-layout{grid-template-columns:1fr}}
@media(max-width:1100px){.strategy-summary-grid{grid-template-columns:1fr 1fr}.strategy-workbench{grid-template-columns:1fr}.signal-board-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.strategy-dashboard-form,.signal-detail-grid,.signal-board-grid,.trade-book-summary{grid-template-columns:1fr}.strategy-actions{flex-direction:column}.strategy-actions .btn,.trading-books-actions .btn{width:100%}.trading-books-actions{align-items:stretch}.trading-books-actions input{width:100%}}
@media(max-width:640px){.strategy-shell{width:min(100% - 20px,100%);padding-top:22px}.hero-copy,.hero-stats,.strategy-panel,.result-panel{border-radius:22px}.strategy-form,.metric-grid,.trade-strip{grid-template-columns:1fr}.hero-copy h1{font-size:2.7rem}}
.metric-warning{display:block;margin-top:8px;color:#cb3939!important;font-size:10px;line-height:1.4}

/* Lovable Strategy Panel visual system */
.app-body{--ink:#f7f3ef;--muted:#aaa19b;--line:rgba(255,255,255,.09);--bg:#292522;--card:#332e2a;--blue:#e76f3c;--cyan:#f2a05f;--green:#5fd39b;--red:#ef6b62;--amber:#f2a05f;--shadow:0 18px 38px -24px rgba(0,0,0,.9);min-height:100vh;background:radial-gradient(circle at 50% -15%,rgba(231,111,60,.15),transparent 35%),#292522;color:var(--ink);font-family:Sora,'DM Sans',system-ui,sans-serif}
.app-content{margin-left:0;min-height:100vh}.topbar{height:76px;padding:0 max(24px,calc((100vw - 1180px)/2));background:rgba(41,37,34,.88);border-color:var(--line);backdrop-filter:blur(18px)}
.topbar-brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none}.topbar-brand>span{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#ef7b43,#c74d2f);color:#241d19;font-weight:800;box-shadow:0 10px 26px rgba(218,84,44,.28)}.topbar-brand small{display:block;color:#f5a66d;font-size:8px;font-weight:800;letter-spacing:.26em}.topbar-brand b{display:block;margin-top:2px;font-size:13px}
.topbar-clock{margin-left:auto;margin-right:18px}.market-clock small,.page-title>div>p:last-child,.control-copy p,.section-head p,.strategy-choice-card p,.trade-book-stat span,.book-guide span,.cell-note{color:#aaa19b}.pulse-dot{background:#5fd39b;box-shadow:0 0 0 5px rgba(95,211,155,.12)}
.workspace{max-width:1180px;padding:42px 24px 70px}.page-title{margin-bottom:28px}.page-title h1{font:600 clamp(30px,4vw,42px) Sora,'DM Sans',sans-serif;letter-spacing:-.04em}.eyebrow,.activity-eyebrow,.strategy-kicker,.scalping-card .strategy-kicker{color:#f5a66d}.strategy-status,.index-card,.metric-card,.control-card,.content-card,.report-filter,.report-metrics article,.trade-book-stat,.signal-metric,.detail-tile{background:rgba(51,46,42,.94);border-color:var(--line);border-radius:20px;box-shadow:var(--shadow)}
.strategy-status{border-radius:999px;padding:10px 16px}.strategy-summary-grid{gap:12px}.index-card,.metric-card{min-height:122px;padding:20px}.index-card small,.metric-card small,.trade-book-stat small{color:#9c928b}.index-card strong,.metric-card strong,.trade-book-stat strong,td b,.strategy-choice-card h4{color:#f7f3ef}.index-card span,.metric-card span{color:#aaa19b}.card-icon,.control-icon{border-radius:50%;background:rgba(231,111,60,.15);color:#f5a66d}
.strategy-control-card{border:1px solid rgba(231,111,60,.34);background:linear-gradient(135deg,rgba(231,111,60,.14),rgba(51,46,42,.94) 48%)}.strategy-tags span{background:rgba(255,255,255,.06);color:#bbb1aa;border:1px solid var(--line)}
.strategy-choice-card,.strategy-choice-card.scalping-card{border-color:var(--line);border-radius:18px;background:#37312d}.strategy-choice-card:hover{border-color:rgba(231,111,60,.45);background:#3b342f}.strategy-choice-card p{min-height:58px}.section-head{border-color:var(--line)}
.btn{border-radius:999px}.btn-primary{background:#e76f3c;color:#241d19;box-shadow:none}.btn-primary:hover{background:#f07c47}.btn-ghost{background:#3b3530;border-color:var(--line);color:#ded6d0}.btn-success{background:rgba(95,211,155,.14);color:#73dda9;border:1px solid rgba(95,211,155,.2)}.btn-danger{background:rgba(239,107,98,.13);color:#f1847c;border-color:rgba(239,107,98,.2)}
.connection-pill{background:rgba(95,211,155,.12);color:#73dda9}.connection-pill.offline{background:rgba(255,255,255,.06);color:#9f9690}.connection-pill.offline i{background:#817871}
.book-guide,.trade-book-summary{background:#302b27;border-color:var(--line)}.book-guide>div{background:#37312d;border-color:var(--line);border-radius:16px}.book-guide>div>b{background:rgba(231,111,60,.15);color:#f5a66d}.book-guide strong{color:#f7f3ef}.tabs{border-color:var(--line);align-items:center}.tabs button{height:34px;border:0;border-radius:999px;padding:0 14px;color:#aaa19b}.tabs button.active{background:#e76f3c;color:#241d19}.tabs em{background:rgba(255,255,255,.1);color:inherit}th{background:#302b27;color:#9c928b}td{border-color:var(--line);color:#c7bdb6}.empty-row td{color:#918780}.side-chip.buy,.action-chip.entry,.result-chip.positive{background:rgba(95,211,155,.15);color:#73dda9}.side-chip.sell,.result-chip.negative{background:rgba(239,107,98,.15);color:#f1847c}.action-chip.exit{background:rgba(255,255,255,.08);color:#c7bdb6}
.raw-section .raw-output{background:#211e1b;color:#d9d0c9}.modal-backdrop{background:rgba(20,17,15,.78)}.modal{background:#332e2a;color:#f7f3ef;border:1px solid var(--line)}.settings-head,.settings-actions{background:#332e2a;border-color:var(--line)}.setting-section{border-color:var(--line)}.login-form input,.stack-form input,.form-grid input,.form-grid select,.strategy-dashboard-form input,.strategy-dashboard-form select,.trading-books-actions input{background:#292522;border-color:rgba(255,255,255,.12);color:#f7f3ef}.login-form label,.stack-form label,.form-grid label,.strategy-dashboard-form label,.trading-books-actions label{color:#c7bdb6}.connected-account{background:#292522;color:#c7bdb6}.modal-close{background:#423b35;color:#c7bdb6}.settings-head p:last-child,.modal-copy{color:#aaa19b}
@media(max-width:900px){.topbar{padding:0 18px}.topbar-clock{display:none}.top-actions{gap:6px}.top-actions .connection-pill{display:none}.workspace{padding-top:28px}}
@media(max-width:760px){.topbar{height:auto;min-height:68px;flex-wrap:wrap;padding:12px 14px}.top-actions{width:100%;padding-top:9px;justify-content:flex-end;border-top:1px solid var(--line)}.top-actions .btn{display:inline-flex;height:36px;font-size:11px}.top-actions #initializeBrokerNavbarBtn,.logout-inline{display:none}.workspace{padding:25px 14px 50px}.page-title{gap:14px}.strategy-summary-grid{grid-template-columns:1fr 1fr}.book-guide{grid-template-columns:1fr}.tabs{align-items:center}.tabs button{flex:0 0 auto}.modal{background:#332e2a}}
@media(max-width:480px){.strategy-summary-grid{grid-template-columns:1fr}.page-title{display:block}.strategy-status{width:max-content;margin-top:16px}}
.book-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px 22px;background:#f7faff;border-bottom:1px solid var(--line)}.book-guide>div{display:flex;gap:11px;align-items:flex-start;padding:12px;border:1px solid #e4eaf3;border-radius:12px;background:#fff}.book-guide>div>b{flex:0 0 25px;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#eaf0ff;color:#315de0;font-size:11px}.book-guide span,.cell-note{display:block;color:#8491a3;font-size:10px;line-height:1.45}.book-guide strong{display:block;color:#26364d;font-size:11px;margin-bottom:3px}.cell-note{margin-top:5px}.action-chip,.result-chip{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;text-transform:uppercase}.action-chip.entry{background:#e8f8f0;color:#177f58}.action-chip.exit{background:#eef2f8;color:#56657a}.result-chip.positive{background:#e8f8f0}.result-chip.negative{background:#fff0f0}.trading-books-card td{height:auto;min-height:52px;padding-top:13px;padding-bottom:13px;vertical-align:top}
@media(max-width:760px){.book-guide{grid-template-columns:1fr;padding:14px}.trading-books-card .table-wrap{overflow:visible}.trading-books-card table,.trading-books-card tbody,.trading-books-card tr,.trading-books-card td{display:block;width:100%}.trading-books-card thead{display:none}.trading-books-card tr{padding:12px 14px;border-top:1px solid #edf0f4}.trading-books-card td{border:0;padding:7px 0;min-height:0}.trading-books-card td:empty{display:none}.trading-books-card .empty-row td{padding:30px 5px}}

/* Compact Pine-style LONG/SHORT confirmation matrix */
.pine-confirmation-card{margin-top:18px;overflow:hidden}.confirmation-section-head{padding:16px 20px}.confirmation-live-meta{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(260px,1.6fr) minmax(150px,.7fr);gap:8px;padding:10px 20px;border-bottom:1px solid rgba(255,255,255,.07)}.confirmation-live-meta>span{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:7px 9px;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:rgba(255,255,255,.035)}.confirmation-live-meta small{color:#9c928b;font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.confirmation-live-meta b{overflow:hidden;color:#ded6d0;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.confirmation-matrix{padding:12px 20px 16px}.confirmation-head-grid,.confirmation-items-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px}.confirmation-column-head,.confirmation-item{display:grid;grid-template-columns:minmax(0,1fr) 46px 46px;align-items:center}.confirmation-column-head{margin-bottom:2px;color:#aaa19b;font-size:8px;font-weight:800;letter-spacing:.07em;text-align:center;text-transform:uppercase}.confirmation-column-head span{text-align:left}.confirmation-column-head b:nth-child(2){color:#62dc94}.confirmation-column-head b:nth-child(3){color:#ff6070}.confirmation-leading-group{display:grid;grid-template-columns:130px minmax(0,1fr);align-items:center;margin-bottom:8px;border:1px solid rgba(255,255,255,.09);border-radius:8px;background:#302d2a}.confirmation-leading-group>small,.confirmation-group-title{padding:0 10px;color:#aaa19b;font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.confirmation-item{min-height:34px;background:#252321;border:1px solid rgba(255,255,255,.075)}.confirmation-item span{overflow:hidden;padding:7px 10px;color:#eee8e3;font-size:10px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.confirmation-item b{align-self:stretch;display:grid;place-items:center;border-left:1px solid rgba(255,255,255,.07);font-size:15px}.confirmation-item.leading{border:0;background:transparent}.confirmation-group-title{padding:2px 0 7px}.confirmation-pass{color:#62dc94!important;background:rgba(50,190,103,.07)}.confirmation-fail{color:#ff6070!important;background:rgba(239,76,93,.07)}
@media(max-width:760px){.confirmation-section-head{align-items:flex-start;gap:10px}.confirmation-section-head .count-badge{white-space:normal;text-align:right}.confirmation-live-meta{grid-template-columns:1fr;padding:8px 12px}.confirmation-live-meta b{white-space:normal}.confirmation-matrix{padding:10px 12px 14px}.confirmation-head-grid,.confirmation-items-grid{grid-template-columns:1fr}.confirmation-column-head:nth-child(2){display:none}.confirmation-leading-group{grid-template-columns:1fr}.confirmation-leading-group>small{padding:7px 10px 0}.confirmation-item{grid-template-columns:minmax(0,1fr) 42px 42px}}

.locked-strategy-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.locked-strategy-summary span{padding:14px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}.locked-strategy-summary small{display:block;margin-bottom:5px;color:#8a96a6;font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.locked-strategy-summary b{color:#25354b;font-size:11px}.locked-strategy-note{margin:12px 0 0;color:#7f8c9d;font-size:10px;line-height:1.55}@media(max-width:760px){.locked-strategy-summary{grid-template-columns:1fr 1fr}}
