/*
 * Trading Terminal shell styles mirrored from chart/index.php.
 * Staged only: this file is not loaded by the production shell yet.
 */
.exfinx-trade-control{position:relative;display:inline-flex;align-items:center;height:32px}.exfinx-trade-btn{height:32px;display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(19,23,34,.12);border-radius:6px;padding:0 11px;background:#fff;color:#131722;font-size:13px;font-weight:800;cursor:pointer}
.exfinx-trade-btn:hover{background:#f2f4f7}.exfinx-trade-icon{width:24px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;background:#131722;color:#fff;font-size:10px;font-weight:900;line-height:1}.exfinx-trade-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}.exfinx-trade-icon [data-trade-broker-mark]{line-height:1}.exfinx-trade-menu-btn[hidden],.exfinx-trade-icon [hidden]{display:none!important}
.exfinx-trade-control.is-connected .exfinx-trade-btn{border-radius:6px 0 0 6px;border-right:0;padding-right:8px}.exfinx-trade-menu-btn{width:25px;height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(19,23,34,.12);border-left:0;border-radius:0 6px 6px 0;background:#fff;color:#131722;padding:0;cursor:pointer}.exfinx-trade-menu-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}.exfinx-trade-menu-btn[aria-expanded=true] svg{transform:rotate(180deg)}
.exfinx-trade-menu{position:absolute;top:calc(100% + 5px);left:0;z-index:2147482000;width:218px;padding:5px;border:1px solid #d8dde6;border-radius:7px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.16);color:#131722}.exfinx-trade-menu[hidden]{display:none}.exfinx-trade-menu button{width:100%;min-height:34px;display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:7px;border:0;border-radius:4px;padding:0 8px;background:transparent;color:inherit;font-size:13px;text-align:left;cursor:pointer}.exfinx-trade-menu button:hover{background:#f1f3f6}.exfinx-trade-menu button.is-danger{color:#dc2626}.exfinx-trade-menu svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1;stroke-linecap:round;stroke-linejoin:round}.exfinx-trade-menu-separator{height:1px;margin:4px -5px;background:#e5e7eb}
.exfinx-trade-modal[hidden]{display:none}.exfinx-trade-modal{position:fixed;inset:0;z-index:2147483500;display:flex;align-items:center;justify-content:center;padding:30px;background:rgba(19,23,34,.26)}
.exfinx-trade-backdrop{position:absolute;inset:0}.exfinx-trade-shell{position:relative;width:min(1168px,calc(100vw - 64px));max-height:calc(100vh - 60px);overflow:auto;border-radius:8px;background:#fff;box-shadow:0 22px 70px rgba(19,23,34,.22);padding:44px 70px 38px;color:#131722}
.exfinx-trade-close{position:absolute;right:22px;top:16px;width:34px;height:34px;border:0;background:transparent;color:#131722;font-size:32px;line-height:1;cursor:pointer}.exfinx-trade-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:34px}
.exfinx-trade-heading h2,.exfinx-mt5-connect-head h2{margin:0;color:#131722;font-size:21px;font-weight:800;line-height:1.25}.exfinx-trade-search{width:38px;height:38px;border:0;background:transparent;color:#131722;cursor:pointer}.exfinx-trade-search svg{width:24px;height:24px}
.exfinx-broker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(156px,1fr));gap:8px}.exfinx-broker-card{height:152px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#131722;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;cursor:pointer}.exfinx-broker-card:hover,.exfinx-broker-card:focus-visible{border-color:#9ca3af;background:#f7f8fa;outline:0}
.exfinx-mt5-logo{width:48px;height:48px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#14b8ff,#0754d8);color:#fff;font-size:28px;font-weight:900;box-shadow:inset 0 -8px 18px rgba(0,0,0,.16)}
.exfinx-paper-logo{width:48px;height:48px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:#131722;color:#fff;font-size:23px;font-weight:900}.exfinx-paper-ready-card{display:grid;gap:8px;border:1px solid #e5e7eb;border-radius:8px;background:#fafafa;padding:18px}.exfinx-paper-ready-card strong{font-size:15px}.exfinx-paper-ready-card p{max-width:620px;margin:0;color:#5f6673;font-size:13px;line-height:1.5}.exfinx-paper-ready-card span{color:#6b7280;font-size:12px;font-weight:800}.exfinx-paper-ready-card span[data-state=selected]{color:#2962ff}.exfinx-paper-select{width:100%;height:47px;margin-top:16px;border:0;border-radius:8px;background:#2962ff;color:#fff;font-size:14px;font-weight:800;cursor:pointer}.exfinx-paper-select:hover{background:#1e53d7}
.exfinx-broker-name{font-size:15px;font-weight:800}.exfinx-broker-subtitle{max-width:112px;color:#6b7280;font-size:11px;line-height:1.2}.exfinx-trade-view[hidden]{display:none}.exfinx-trade-back{margin:0 0 22px;border:0;background:transparent;color:#2962ff;font-size:13px;font-weight:800;cursor:pointer}
.exfinx-mt5-connect-head{display:flex;align-items:center;gap:16px;margin-bottom:28px}.exfinx-mt5-connect-head p{margin:5px 0 0;color:#5f6673;font-size:13px}.exfinx-mt5-field{display:grid;gap:7px;margin-bottom:12px;color:#6b7280;font-size:13px;font-weight:700}.exfinx-mt5-field input{height:47px;border:1px solid #c9ced8;border-radius:8px;padding:0 12px;background:#fff;color:#131722;font-size:13px;font-weight:700}
.exfinx-mt5-actions{display:flex;gap:8px;margin-bottom:8px}.exfinx-mt5-secondary{min-height:36px;border:1px solid #d8dde6;border-radius:7px;background:#fff;color:#131722;padding:0 13px;font-size:12px;font-weight:800;cursor:pointer}.exfinx-mt5-secondary:hover{background:#f5f6f8}.exfinx-mt5-secondary:disabled{opacity:.48;cursor:not-allowed}.exfinx-mt5-key-note{margin:0 0 10px;color:#6b7280;font-size:11px;line-height:1.45}.exfinx-mt5-status{min-height:20px;color:#2962ff;font-size:12px;font-weight:800}
.exfinx-mt5-live-card{border:1px solid #e5e7eb;border-radius:8px;background:#fff;margin:14px 0 18px;padding:14px}.exfinx-mt5-live-head,.exfinx-mt5-symbols-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.exfinx-mt5-live-head h3{margin:0;color:#131722;font-size:15px}.exfinx-mt5-live-head p{margin:4px 0 0;color:#5f6673;font-size:12px}.exfinx-mt5-live-pill{min-height:26px;border-radius:999px;padding:6px 10px;background:rgba(220,38,38,.1);color:#b91c1c;font-size:11px;font-weight:900}.exfinx-mt5-live-pill[data-state=online]{background:rgba(5,150,105,.12);color:#047857}.exfinx-mt5-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0}.exfinx-mt5-metrics div{border:1px solid #eef0f4;border-radius:7px;padding:10px;background:#fafafa}.exfinx-mt5-metrics span{display:block;color:#6b7280;font-size:11px;font-weight:800}.exfinx-mt5-metrics strong{display:block;margin-top:4px;color:#131722;font-size:14px}.exfinx-mt5-symbols-head{border-top:1px solid #eef0f4;padding-top:12px;color:#374151;font-size:12px;font-weight:900}.exfinx-mt5-symbols-head button{border:1px solid #d8dde6;border-radius:7px;background:#fff;color:#131722;min-height:30px;padding:0 10px;font-size:12px;font-weight:800;cursor:pointer}.exfinx-mt5-symbols{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;max-height:94px;overflow:auto}.exfinx-mt5-symbols span,.exfinx-mt5-symbol-chip{border:1px solid #e5e7eb;border-radius:999px;background:#f8fafc;color:#374151;padding:5px 9px;font-size:12px;font-weight:800}
.exfinx-mt5-symbol-chip[aria-pressed=true]{border-color:#2962ff;background:rgba(41,98,255,.1);color:#1d4ed8}
.exfinx-mt5-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.exfinx-mt5-steps section{border:1px solid #e5e7eb;border-radius:8px;padding:14px;background:#fafafa}.exfinx-mt5-steps span{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#131722;color:#fff;font-size:11px;font-weight:900}.exfinx-mt5-steps h3{margin:10px 0 5px;color:#131722;font-size:14px}.exfinx-mt5-steps p{margin:0;color:#5f6673;font-size:12px;line-height:1.45}
.exfinx-mt5-agreement{display:flex;gap:10px;align-items:flex-start;margin:16px 0;color:#374151;font-size:13px;line-height:1.45}.exfinx-mt5-agreement input{width:16px;height:16px;flex:0 0 16px;margin-top:1px}.exfinx-mt5-download{height:47px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#2f2f2f;color:#fff;text-decoration:none;font-size:14px;font-weight:800}.exfinx-mt5-download.is-disabled{opacity:.45;cursor:not-allowed;pointer-events:auto}
body.theme-dark .exfinx-trade-btn,body.theme-dark .exfinx-trade-menu-btn{border-color:#363a45;background:#131722;color:#f0f3fa}body.theme-dark .exfinx-trade-menu{border-color:#3a3a3a;background:var(--qt-settings-bg,#1f1f1f);color:#f0f3fa;box-shadow:0 8px 22px rgba(0,0,0,.38)}body.theme-dark .exfinx-trade-menu button:hover{background:#2a2a2a}body.theme-dark .exfinx-trade-menu-separator{background:#3a3a3a}body.theme-dark .exfinx-trade-shell{background:var(--qt-settings-bg,#1f1f1f);color:#f0f3fa}body.theme-dark .exfinx-trade-close,body.theme-dark .exfinx-trade-heading h2,body.theme-dark .exfinx-mt5-connect-head h2,body.theme-dark .exfinx-mt5-steps h3,body.theme-dark .exfinx-mt5-live-head h3,body.theme-dark .exfinx-mt5-metrics strong{color:#f0f3fa}body.theme-dark .exfinx-broker-card,body.theme-dark .exfinx-mt5-field input,body.theme-dark .exfinx-mt5-secondary,body.theme-dark .exfinx-mt5-steps section,body.theme-dark .exfinx-mt5-live-card,body.theme-dark .exfinx-mt5-metrics div,body.theme-dark .exfinx-mt5-symbols-head button{border-color:#3a3a3a;background:#171717;color:#f0f3fa}body.theme-dark .exfinx-broker-subtitle,body.theme-dark .exfinx-mt5-connect-head p,body.theme-dark .exfinx-mt5-field,body.theme-dark .exfinx-mt5-steps p,body.theme-dark .exfinx-mt5-agreement,body.theme-dark .exfinx-mt5-live-head p,body.theme-dark .exfinx-mt5-metrics span{color:#aeb4c2}body.theme-dark .exfinx-mt5-symbols-head{border-color:#363a45;color:#d1d5db}body.theme-dark .exfinx-mt5-symbols span,body.theme-dark .exfinx-mt5-symbol-chip{border-color:#363a45;background:#131722;color:#d1d5db}
.exfinx-mt5-live-pill[data-state=local-ready]{background:rgba(5,150,105,.12);color:#047857}
body.theme-dark .exfinx-paper-ready-card{border-color:#363a45;background:#0d0f14}body.theme-dark .exfinx-paper-ready-card p,body.theme-dark .exfinx-paper-ready-card span{color:#aeb4c2}
.exfinx-trade-dock[hidden]{display:none!important}.exfinx-trade-dock{grid-column:2;grid-row:2;width:calc(100% - (var(--ex-shell-gutter,4px) * 2 + 1px));min-width:0;min-height:0;margin-left:var(--ex-shell-gutter,4px);margin-right:calc(var(--ex-shell-gutter,4px) + 1px);display:flex;flex-direction:column;border-top:1px solid #d8dde6;background:#fff;color:#131722;z-index:80;overflow:hidden}.exfinx-trade-dock-open #chart-viewport-wrapper{grid-template-rows:minmax(0,1fr) minmax(190px,var(--ex-trade-dock-height,34vh))!important}.exfinx-trade-dock-open #canvas-container{grid-row:1!important}.exfinx-trade-dock-open #toolbar-left,.exfinx-trade-dock-open #qt-right-dock-slot,.exfinx-trade-dock-open #qt-right-toolbar{grid-row:1/-1!important}.exfinx-trade-dock-open.qt-chart-tabs-open #chart-viewport-wrapper{grid-template-rows:31px minmax(0,1fr) minmax(190px,var(--ex-trade-dock-height,34vh))!important}.exfinx-trade-dock-open.qt-chart-tabs-open #canvas-container{grid-row:2!important}.exfinx-trade-dock-open.qt-chart-tabs-open .exfinx-trade-dock{grid-row:3}.exfinx-trade-dock-header{height:38px;min-height:38px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eef0f4;padding:0 10px}.exfinx-trade-dock-broker{display:flex;align-items:center;gap:7px;font-size:12px}.exfinx-trade-dock-logo{width:21px;height:21px;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;background:#131722;color:#fff;font-size:8px;font-weight:900}.exfinx-trade-dock-state{color:#089981;font-size:11px}.exfinx-trade-dock-window-actions{display:flex;align-items:center;gap:2px}.exfinx-trade-dock-window-actions button{width:28px;height:28px;border:0;border-radius:4px;background:transparent;color:inherit;font-size:18px;cursor:pointer}.exfinx-trade-dock-window-actions button:hover{background:#f1f3f6}.exfinx-trade-dock-summary{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:8px 14px}.exfinx-trade-account-select{height:30px;display:inline-flex;align-items:center;gap:7px;border:1px solid #d8dde6;border-radius:5px;background:#fff;color:inherit;padding:0 9px;font-size:12px;cursor:pointer}.exfinx-trade-account-select svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.2}.exfinx-trade-account-metrics{display:grid;grid-template-columns:repeat(4,minmax(92px,1fr));gap:20px}.exfinx-trade-account-metrics div{display:grid;gap:2px}.exfinx-trade-account-metrics span{color:#6b7280;font-size:10px}.exfinx-trade-account-metrics strong{font-size:12px;font-weight:600;white-space:nowrap}.exfinx-trade-dock-tabs{display:flex;align-items:center;gap:4px;padding:0 14px 7px;overflow-x:auto}.exfinx-trade-dock-tabs button{height:28px;flex:0 0 auto;border:0;border-radius:14px;background:#f1f3f6;color:#131722;padding:0 12px;font-size:12px;cursor:pointer}.exfinx-trade-dock-tabs button[aria-selected=true]{background:#131722;color:#fff}.exfinx-trade-dock-content{min-height:0;flex:1;display:flex;flex-direction:column;border-top:1px solid #eef0f4;overflow:auto}.exfinx-trade-dock-table-head{min-width:920px;height:36px;display:grid;grid-template-columns:1.3fr .65fr .7fr repeat(5,1fr);align-items:center;gap:16px;padding:0 14px;border-bottom:1px solid #eef0f4;color:#6b7280;font-size:10px}.exfinx-trade-dock-empty{min-height:110px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#6b7280;font-size:11px;text-align:center}.exfinx-trade-dock-empty svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1}.exfinx-trade-dock-empty strong{color:#374151;font-size:12px}.exfinx-trade-dock.is-minimized{min-height:38px;height:38px}.exfinx-trade-dock.is-minimized>:not(.exfinx-trade-dock-header){display:none}.exfinx-trade-dock-open:has(.exfinx-trade-dock.is-minimized) #chart-viewport-wrapper{grid-template-rows:minmax(0,1fr) 38px!important}.exfinx-trade-dock-open.qt-chart-tabs-open:has(.exfinx-trade-dock.is-minimized) #chart-viewport-wrapper{grid-template-rows:31px minmax(0,1fr) 38px!important}
body.theme-dark .exfinx-trade-dock{border-color:#2a2e39;background:#0d0f14;color:#f0f3fa}body.theme-dark .exfinx-trade-dock-header,body.theme-dark .exfinx-trade-dock-content,body.theme-dark .exfinx-trade-dock-table-head{border-color:#2a2e39}body.theme-dark .exfinx-trade-dock-window-actions button:hover{background:#2a2e39}body.theme-dark .exfinx-trade-account-select{border-color:#363a45;background:#131722}body.theme-dark .exfinx-trade-account-metrics span,body.theme-dark .exfinx-trade-dock-empty{color:#9ca3af}body.theme-dark .exfinx-trade-dock-tabs button{background:#242832;color:#d1d5db}body.theme-dark .exfinx-trade-dock-tabs button[aria-selected=true]{background:#f0f3fa;color:#131722}body.theme-dark .exfinx-trade-dock-empty strong{color:#d1d5db}
.exfinx-trade-dock-header{cursor:pointer}.exfinx-trade-dock-header:focus-visible{outline:2px solid #2962ff;outline-offset:-2px}
@media(max-width:760px){.exfinx-trade-modal{padding:12px}.exfinx-trade-shell{width:100%;max-height:calc(100vh - 24px);padding:32px 20px 24px}.exfinx-broker-grid,.exfinx-mt5-steps,.exfinx-mt5-metrics{grid-template-columns:1fr}.exfinx-trade-heading{margin-bottom:22px}.exfinx-mt5-actions{flex-direction:column}.exfinx-mt5-secondary{width:100%}}
.exfinx-trade-position-row{min-width:920px;min-height:38px;display:grid;grid-template-columns:1.3fr .65fr .7fr repeat(5,1fr);align-items:center;gap:16px;padding:0 14px;border-bottom:1px solid #eef0f4;font-size:11px}.exfinx-trade-position-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.exfinx-trade-position-row span:nth-child(2){font-weight:700}.exfinx-trade-position-row span:last-child{font-variant-numeric:tabular-nums}body.theme-dark .exfinx-trade-position-row{border-color:#2a2e39}
.exfinx-trade-balance-head,.exfinx-trade-balance-row{grid-template-columns:1.2fr 1fr .7fr 1.4fr}.exfinx-trade-balance-row span:nth-child(2){font-variant-numeric:tabular-nums}
.exfinx-trade-journal-grid{min-width:980px;grid-template-columns:1.35fr .8fr .8fr .9fr 2.4fr}.exfinx-trade-journal-grid span:first-child{font-variant-numeric:tabular-nums}
.exfinx-trade-orders-grid{min-width:1540px;grid-template-columns:1.1fr .65fr .8fr .65fr .75fr .9fr .9fr 1fr .85fr 1.25fr 1.35fr 1.35fr}.exfinx-working-order-row-actions{display:flex!important;align-items:center;gap:5px;overflow:visible!important}.exfinx-working-order-row-actions button{height:25px;border:1px solid #d8dde6;border-radius:5px;background:#fff;color:#131722;padding:0 8px;font-size:10px;cursor:pointer}.exfinx-working-order-row-actions button:last-child{color:#d32f2f}.exfinx-working-order-row-actions button:disabled{opacity:.4;cursor:not-allowed}.exfinx-trade-table-toolbar{min-height:42px;display:flex;align-items:center;gap:5px;padding:6px 14px;border-bottom:1px solid #eef0f4}.exfinx-trade-table-toolbar button{height:28px;border:0;border-radius:14px;background:#f1f3f6;color:#131722;padding:0 12px;font-size:11px;cursor:pointer}.exfinx-trade-table-toolbar button[aria-pressed=true]{background:#131722;color:#fff}.exfinx-trade-account-summary-table{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1px;background:#eef0f4}.exfinx-trade-account-summary-table>div{min-height:70px;display:grid;grid-template-columns:1fr auto;align-content:center;gap:5px 10px;padding:10px 14px;background:#fff}.exfinx-trade-account-summary-table>div>span:first-child{grid-column:1/-1;color:#6b7280;font-size:10px}.exfinx-trade-account-summary-table strong{font-size:14px;font-variant-numeric:tabular-nums}.exfinx-trade-account-summary-table>div>span:last-child{align-self:end;color:#6b7280;font-size:10px}body.theme-dark .exfinx-working-order-row-actions button{border-color:#363a45;background:#1e222d;color:#f0f3fa}body.theme-dark .exfinx-working-order-row-actions button:last-child{color:#f77}body.theme-dark .exfinx-trade-table-toolbar{border-color:#2a2e39}body.theme-dark .exfinx-trade-table-toolbar button{background:#242832;color:#d1d5db}body.theme-dark .exfinx-trade-table-toolbar button[aria-pressed=true]{background:#f0f3fa;color:#131722}body.theme-dark .exfinx-trade-account-summary-table{background:#2a2e39}body.theme-dark .exfinx-trade-account-summary-table>div{background:#0d0f14}body.theme-dark .exfinx-trade-account-summary-table>div>span{color:#9ca3af}
.exfinx-trade-activity-pager-host{flex:0 0 auto;border-top:1px solid #eef0f4;background:#fff}.exfinx-trade-activity-pager-host[hidden]{display:none!important}.exfinx-trade-activity-pager{min-height:42px;display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 14px}.exfinx-trade-activity-pager-button{height:28px;border:1px solid #d8dde6;border-radius:5px;background:#fff;color:#131722;padding:0 13px;font-size:11px;font-weight:600;cursor:pointer}.exfinx-trade-activity-pager-button:hover:not(:disabled){border-color:#2962ff;color:#2962ff}.exfinx-trade-activity-pager-button:disabled{cursor:default;opacity:.62}.exfinx-trade-activity-pager-status{color:#6b7280;font-size:10px}.exfinx-trade-activity-pager[data-state=error] .exfinx-trade-activity-pager-status{color:#f23645}body.theme-dark .exfinx-trade-activity-pager-host{border-color:#2a2e39;background:#0d0f14}body.theme-dark .exfinx-trade-activity-pager-button{border-color:#363a45;background:#131722;color:#d1d5db}body.theme-dark .exfinx-trade-activity-pager-status{color:#9ca3af}
.exfinx-position-row-actions{display:flex!important;align-items:center;overflow:visible!important}.exfinx-position-row-actions button{height:25px;border:1px solid #d8dde6;border-radius:5px;background:#fff;color:#131722;padding:0 8px;font-size:10px;white-space:nowrap;cursor:pointer}.exfinx-position-row-actions button:disabled{opacity:.4;cursor:not-allowed}body.theme-dark .exfinx-position-row-actions button{border-color:#363a45;background:#1e222d;color:#f0f3fa}
