/* =====================================================================
   Trader2Algo — Client & Master portal theme (loaded after dashboard.css)
   Same design language as trader2algo.com: Inter + Manrope, deep navy,
   glass surfaces, blue→violet gradient accents. Dark + light themes.
   Rules are id-scoped (#mainApp, modal ids) so they win over dashboard.css
   without touching its layout logic.
   ===================================================================== */
html{
  --a-bg:#030914;--a-bg2:#050c18;--a-surface:rgba(255,255,255,.035);--a-surface2:rgba(255,255,255,.06);--a-solid:#0a1322;--a-solid2:#0e1a2d;
  --a-line:rgba(255,255,255,.08);--a-line2:rgba(255,255,255,.14);
  --a-text:#e9f0fb;--a-muted:#8a9bb6;--a-dim:#5f6f8a;--a-link:#7fb8ff;
  --a-accent:#53a4ff;--a-accent2:#9566ff;--a-grad:linear-gradient(90deg,#53a4ff,#9566ff);
  --a-green:#2fe08a;--a-green-bg:rgba(47,224,138,.1);--a-red:#ff5c72;--a-red-bg:rgba(255,92,114,.1);--a-amber:#ffc24d;--a-amber-bg:rgba(255,194,77,.1);
  --a-blue-bg:rgba(83,164,255,.1);--a-violet-bg:rgba(149,102,255,.12);
  --a-head:rgba(4,10,21,.78);--a-shadow:0 18px 50px rgba(0,0,0,.35);--a-glow1:rgba(83,164,255,.10);--a-glow2:rgba(149,102,255,.08);
  --a-radius:18px;
}
html[data-theme="light"]{
  --a-bg:#f4f7fc;--a-bg2:#ffffff;--a-surface:#ffffff;--a-surface2:#f1f5fb;--a-solid:#ffffff;--a-solid2:#f6f9fd;
  --a-line:#e2e8f2;--a-line2:#cfd9e7;
  --a-text:#121b2d;--a-muted:#55637a;--a-dim:#8390a6;--a-link:#2f6fe0;
  --a-accent:#2f7cf0;--a-accent2:#7a4cf0;--a-grad:linear-gradient(90deg,#2f7cf0,#7a4cf0);
  --a-green:#11865a;--a-green-bg:#e6f7ef;--a-red:#d23447;--a-red-bg:#fdecee;--a-amber:#a8650a;--a-amber-bg:#fff4dc;
  --a-blue-bg:#eaf2ff;--a-violet-bg:#f1ebff;
  --a-head:rgba(255,255,255,.86);--a-shadow:0 14px 36px rgba(20,40,80,.08);--a-glow1:rgba(47,124,240,.05);--a-glow2:rgba(122,76,240,.04);
}

/* ---------- Base ---------- */
body #mainApp,body #mainApp *,body .mt5-modal *,body .fs-modal *,body .profile-sidebar *,body .security-dialog *,body #askAI *{font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
body #mainApp [hidden],body #mt5LoginModal [hidden],body #followerSettingsModal [hidden]{display:none!important}
body #mainApp{background:radial-gradient(1000px 700px at 0% 0%,var(--a-glow1),transparent 60%),radial-gradient(900px 700px at 100% 100%,var(--a-glow2),transparent 60%),var(--a-bg)!important;color:var(--a-text)!important;
  grid-template-rows:68px minmax(0,1fr)!important;grid-template-columns:248px minmax(0,1fr)}
body #mainApp.collapsed{grid-template-columns:72px minmax(0,1fr)}
body #mainApp .main,body #mainApp .page:not(#chart){background:transparent!important;color:var(--a-text)}
body #mainApp .page:not(#chart){padding:28px 32px 40px!important}
body #mainApp h1,body #mainApp h2,body #mainApp h3{font-family:Manrope,Inter,sans-serif!important;letter-spacing:-.01em}
body #mainApp ::-webkit-scrollbar{width:10px;height:10px}
body #mainApp ::-webkit-scrollbar-thumb{background:var(--a-line2);border-radius:10px;border:2px solid transparent;background-clip:padding-box}
body #mainApp ::-webkit-scrollbar-track{background:transparent}

/* ---------- Header ---------- */
body #mainApp .header{height:68px!important;padding:0 18px 0 14px!important;gap:16px;background:var(--a-head)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid var(--a-line)!important;grid-column:2/-1!important}
body #mainApp .header .sidebar-toggle{width:40px!important;min-width:40px!important;height:40px!important;border-radius:12px!important;background:var(--a-surface)!important;border:1px solid var(--a-line2)!important;color:var(--a-text)!important;font-size:18px!important}
body #mainApp .header .sidebar-toggle:hover{border-color:var(--a-accent)!important}
body #mainApp .header-left{gap:14px}
body #mainApp .header-metrics{display:flex;gap:8px}
body #mainApp .header-metric{padding:7px 14px!important;border-radius:12px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important;min-width:0}
body #mainApp .header-metric span{display:block;color:var(--a-dim)!important;font-size:10px!important;font-weight:700!important;letter-spacing:1px!important}
body #mainApp .header-metric strong{display:block;color:var(--a-text)!important;font:800 15px/1.3 Manrope,Inter,sans-serif!important}
body #mainApp .header-right{gap:10px}
body #mainApp #themeToggle{width:40px!important;height:40px!important;min-width:40px;padding:0!important;border-radius:12px!important;background:var(--a-surface)!important;border:1px solid var(--a-line2)!important;color:var(--a-text)!important;font-size:16px!important}
body #mainApp #themeToggle:hover{border-color:var(--a-accent)!important}
body #mainApp .header #masterStatus{height:40px;padding:0 14px!important;border-radius:12px!important;font-size:12px!important;font-weight:700!important;letter-spacing:.4px;cursor:pointer}
body #mainApp .header #masterStatus.online{background:var(--a-green-bg)!important;border:1px solid rgba(47,224,138,.35)!important;color:var(--a-green)!important}
body #mainApp .header #masterStatus.offline{background:var(--a-red-bg)!important;border:1px solid rgba(255,92,114,.35)!important;color:var(--a-red)!important}
body #mainApp .header #masterStatus.pending{background:var(--a-amber-bg)!important;border:1px solid rgba(255,194,77,.35)!important;color:var(--a-amber)!important}
body #mainApp .header #masterStatus:not(.online):not(.offline):not(.pending){background:var(--a-surface)!important;border:1px solid var(--a-line2)!important;color:var(--a-muted)!important}
body #mainApp .header-account strong{color:var(--a-text)!important;font:700 14px Inter,sans-serif!important}
body #mainApp .header-account small{color:var(--a-dim)!important;font-size:11.5px!important}
body #mainApp .header #profileBtn{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;padding:0;display:grid;place-items:center}
body #mainApp .header #profileBtn:hover{border-color:var(--a-accent)!important}
body #mainApp .header #profileBtn img{width:70%!important;height:70%!important}

/* ---------- Sidebar ---------- */
body #mainApp .sidebar{grid-row:1/-1!important;grid-column:1!important;display:flex!important;flex-direction:column;padding:0 14px 16px!important;background:var(--a-bg2)!important;border-right:1px solid var(--a-line)!important;overflow-y:auto;overflow-x:hidden}
html[data-theme="light"] body #mainApp .sidebar{background:#fff!important}
body #mainApp .side-brand{display:flex;align-items:center;gap:11px;height:68px;flex:none;padding:0 4px;margin:0 -14px 0;padding-left:15px;border-bottom:1px solid var(--a-line)}
body #mainApp .side-brand img{width:42px;height:42px;object-fit:contain;flex:none}
body #mainApp .side-brand strong{display:block;font:800 15px/1.2 Manrope,Inter,sans-serif;letter-spacing:.5px;color:var(--a-text)}
body #mainApp .side-brand small{display:block;font-size:9.5px;font-weight:700;letter-spacing:1.6px;color:var(--a-dim)}
body #mainApp .side-label{margin:20px 8px 8px;font-size:10.5px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;color:var(--a-dim)}
body #mainApp .sidebar nav{gap:4px!important;padding-top:0!important}
body #mainApp .nav-item{height:44px!important;padding:0 12px!important;gap:12px!important;border-radius:12px!important;font:600 14px Inter,sans-serif!important;color:var(--a-muted)!important;background:transparent!important;position:relative;transition:background .15s,color .15s}
body #mainApp .nav-item:hover{background:var(--a-surface2)!important;color:var(--a-text)!important}
body #mainApp .nav-item.active{background:linear-gradient(90deg,rgba(83,164,255,.16),rgba(149,102,255,.10))!important;color:var(--a-text)!important;box-shadow:inset 0 0 0 1px rgba(83,164,255,.22)}
html[data-theme="light"] body #mainApp .nav-item.active{background:linear-gradient(90deg,#e8f1ff,#f1ebff)!important;color:#1b3f8f!important;box-shadow:inset 0 0 0 1px #cfe0ff}
body #mainApp .nav-item.active::before{content:"";position:absolute;left:-14px;top:10px;bottom:10px;width:3px;border-radius:0 3px 3px 0;background:var(--a-grad)}
body #mainApp .nav-icon{display:grid!important;place-items:center;width:22px;height:22px;flex:none;font-size:0!important}
body #mainApp .nav-icon svg{width:20px;height:20px}
body #mainApp .nav-item.active .nav-icon{color:var(--a-accent)}
body #mainApp .side-help{margin-top:auto;padding:16px;border-radius:16px;border:1px solid var(--a-line);background:linear-gradient(135deg,rgba(83,164,255,.10),rgba(149,102,255,.08))}
body #mainApp .side-help strong{display:block;font-size:13.5px;color:var(--a-text)}
body #mainApp .side-help span{display:block;margin:4px 0 10px;font-size:12px;line-height:1.5;color:var(--a-muted)}
body #mainApp .side-help a{font-size:12.5px;font-weight:700;color:var(--a-link);text-decoration:none}
/* collapsed-state rules: see "Modern sidebar" block at end of file */
@media(min-width:769px) and (max-width:1100px){
  body #mainApp .header-metric{padding:6px 10px!important}
}

/* ---------- Shared page heading ---------- */
body #mainApp .dash-heading,body #mainApp .positions-heading,body #mainApp .pay-head{display:flex!important;flex-direction:row!important;align-items:flex-end!important;justify-content:space-between!important;text-align:left!important;gap:20px;margin-bottom:24px!important}
body #mainApp .dash-eyebrow,body #mainApp .positions-eyebrow,body #mainApp .followers-eyebrow{display:inline-flex!important;align-items:center;gap:8px;margin:0 0 12px!important;padding:5px 11px;border-radius:100px;border:1px solid rgba(83,164,255,.28);background:var(--a-blue-bg)!important;color:var(--a-link)!important;font-size:11px!important;font-weight:800!important;letter-spacing:1.2px!important}
body #mainApp .dash-live,body #mainApp .positions-eyebrow span{color:var(--a-green)!important;font-weight:800}
body #mainApp .dash-heading h1,body #mainApp .positions-heading h1,body #mainApp .pay-head h1{margin:0 0 6px!important;font:800 clamp(26px,2.6vw,34px)/1.15 Manrope,Inter,sans-serif!important;color:var(--a-text)!important;text-transform:none!important;letter-spacing:-.02em!important}
body #mainApp .dash-heading p,body #mainApp .positions-heading p,body #mainApp .pay-head p{margin:0!important;color:var(--a-muted)!important;font-size:14.5px!important;max-width:640px}
body #mainApp .dash-date{padding:9px 14px!important;border-radius:12px!important;border:1px solid var(--a-line)!important;background:var(--a-surface)!important;color:var(--a-muted)!important;font-size:13px!important;font-weight:600!important;white-space:nowrap}

/* ---------- Generic surfaces ---------- */
body #mainApp .panel,body #mainApp .positions-panel,body #mainApp .mt5-account-card,body #mainApp .closed-history,body #mainApp #dashboardHistory,body #mainApp .master-tg-panel{background:var(--a-surface)!important;border:1px solid var(--a-line)!important;border-radius:var(--a-radius)!important;box-shadow:var(--a-shadow)!important;color:var(--a-text)!important}
html[data-theme="light"] body #mainApp .panel,html[data-theme="light"] body #mainApp .positions-panel,html[data-theme="light"] body #mainApp .mt5-account-card,html[data-theme="light"] body #mainApp .closed-history,html[data-theme="light"] body #mainApp #dashboardHistory,html[data-theme="light"] body #mainApp .master-tg-panel{background:#fff!important;border-color:var(--a-line)!important}

/* ---------- Dashboard metric cards ---------- */
body #mainApp #dashboard .cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
body #mainApp #dashboard .card{min-height:0!important;padding:20px 22px!important;text-align:left!important;border-radius:var(--a-radius)!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important;box-shadow:var(--a-shadow)!important;display:flex;flex-direction:column}
html[data-theme="light"] body #mainApp #dashboard .card{background:#fff!important}
body #mainApp #dashboard .card:hover{transform:translateY(-2px);border-color:var(--a-line2)!important}
body #mainApp #dashboard .metric-top{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:12px;margin-bottom:14px!important}
body #mainApp #dashboard .metric-top>span:first-child{color:var(--a-muted)!important;font-size:12.5px!important;font-weight:600!important;letter-spacing:.2px;text-transform:none}
body #mainApp #dashboard .metric-icon{width:36px!important;height:36px!important;border-radius:11px!important;font-size:16px!important;margin:0!important;order:2}
body #mainApp #dashboard .metric-icon.green{background:var(--a-green-bg)!important;color:var(--a-green)!important}
body #mainApp #dashboard .metric-icon.pink{background:var(--a-violet-bg)!important;color:#c39bff!important}
body #mainApp #dashboard .metric-icon.blue{background:var(--a-blue-bg)!important;color:var(--a-accent)!important}
body #mainApp #dashboard .metric-icon.purple{background:var(--a-violet-bg)!important;color:var(--a-accent2)!important}
body #mainApp #dashboard .metric-icon.cyan{background:rgba(83,216,255,.1)!important;color:#53d8ff!important}
body #mainApp #dashboard .metric-icon.orange{background:var(--a-amber-bg)!important;color:var(--a-amber)!important}
body #mainApp #dashboard .card strong{display:block;margin:0!important;font:800 30px/1.1 Manrope,Inter,sans-serif!important;color:var(--a-text)!important;letter-spacing:-.02em}
body #mainApp #dashboard .card small{display:block;margin-top:8px!important;color:var(--a-dim)!important;font-size:12.5px!important}
body #mainApp #dashboard .metric-line{left:22px!important;right:22px!important;width:auto!important;bottom:0!important;height:2px!important;border-radius:2px;opacity:1!important;background:var(--a-grad)!important;transform:scaleX(.25);transform-origin:left;transition:transform .3s}
body #mainApp #dashboard .card:hover .metric-line{transform:scaleX(1)}
body #mainApp .positive,body #mainApp .profit{color:var(--a-green)!important}
body #mainApp .negative,body #mainApp .loss{color:var(--a-red)!important}

/* ---------- P/L calendar (dashboard + history) ---------- */
body #mainApp #dashboardHistory{margin-top:20px!important;overflow:hidden}
body #mainApp .history-page{padding:24px!important;background:transparent!important}
body #mainApp .history-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px!important;padding:0!important;background:transparent!important;border:0!important}
body #mainApp .history-tab{padding:0!important;border:0!important;background:transparent!important;color:var(--a-text)!important;font:800 20px Manrope,Inter,sans-serif!important}
body #mainApp .history-tab::after{display:none!important}
body #mainApp .history-account{padding:6px 12px!important;border-radius:100px!important;background:var(--a-surface2)!important;border:1px solid var(--a-line)!important;color:var(--a-muted)!important;font-size:12px!important;font-weight:700!important}
body #mainApp .history-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:16px!important}
body #mainApp .history-navigation{display:flex;align-items:center;gap:8px}
body #mainApp .history-navigation h2{margin:0 6px!important;font:800 18px Manrope,Inter,sans-serif!important;color:var(--a-text)!important;min-width:150px;text-align:center}
body #mainApp .history-navigation button,body #mainApp .closed-toolbar button,body #mainApp .closed-toolbar select,body #mainApp .pay-btn:not(.primary),body #mainApp .pay-toolbar select,body #mainApp .pay-toolbar input{height:38px!important;min-width:38px;padding:0 14px!important;border-radius:11px!important;background:var(--a-surface)!important;border:1px solid var(--a-line2)!important;color:var(--a-text)!important;font:600 13px Inter,sans-serif!important;cursor:pointer;box-shadow:none!important}
body #mainApp .history-navigation button:hover,body #mainApp .closed-toolbar button:hover,body #mainApp .pay-btn:not(.primary):hover{border-color:var(--a-accent)!important;background:var(--a-blue-bg)!important}
body #mainApp #closedRefresh{background:var(--a-grad)!important;border:0!important;color:#fff!important}
body #mainApp .history-stats{display:flex;align-items:center;gap:8px;padding:0!important;background:transparent!important;border:0!important;color:var(--a-muted)!important;font-size:13px!important}
body #mainApp .history-stats strong,body #mainApp #historyTradingDays{padding:7px 12px!important;border-radius:10px!important;border:1px solid var(--a-line)!important;background:var(--a-surface2)!important;font-weight:700!important;color:var(--a-text)!important}
body #mainApp #historyMonthlyPnl.profit{color:var(--a-green)!important;background:var(--a-green-bg)!important;border-color:rgba(47,224,138,.3)!important}
body #mainApp #historyMonthlyPnl.loss{color:var(--a-red)!important;background:var(--a-red-bg)!important;border-color:rgba(255,92,114,.3)!important}
body #mainApp .history-calendar{gap:6px!important;border:0!important;background:transparent!important;border-radius:0!important;overflow:visible!important}
body #mainApp .history-weekday{padding:8px 0!important;background:transparent!important;border:0!important;color:var(--a-dim)!important;font-size:11px!important;font-weight:800!important;letter-spacing:1px!important;text-transform:uppercase;text-align:center}
body #mainApp .history-day{min-height:104px!important;padding:9px!important;border-radius:14px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important;transition:border-color .15s}
html[data-theme="light"] body #mainApp .history-day{background:#fbfcfe!important}
body #mainApp .history-day:hover{border-color:var(--a-line2)!important}
body #mainApp .history-day.outside{opacity:.35}
body #mainApp .history-day.today{border-color:var(--a-accent)!important;box-shadow:0 0 0 3px rgba(83,164,255,.15)}
body #mainApp .history-day-number{color:var(--a-muted)!important;font-size:12px!important;font-weight:700!important;margin-bottom:8px!important;text-align:left!important}
body #mainApp .history-trade{min-height:0!important;padding:8px!important;border-radius:10px!important;border:1px solid transparent!important;text-align:left!important}
body #mainApp .history-trade.profit{background:var(--a-green-bg)!important;border-color:rgba(47,224,138,.22)!important}
body #mainApp .history-trade.loss{background:var(--a-red-bg)!important;border-color:rgba(255,92,114,.22)!important}
body #mainApp .history-trade.neutral{background:var(--a-surface2)!important}
body #mainApp .history-trade strong{display:block;font:800 13.5px Manrope,Inter,sans-serif!important}
body #mainApp .history-trade.profit strong{color:var(--a-green)!important}
body #mainApp .history-trade.loss strong{color:var(--a-red)!important}
body #mainApp .history-trade small{display:block;margin-top:2px;color:var(--a-muted)!important;font-size:11px!important}
body #mainApp #historyMessage{color:var(--a-muted)}

/* ---------- Tables (followers, closed trades, payout, demo pool) ---------- */
body #mainApp .growth-table-wrap,body #mainApp .closed-table-wrap,body #mainApp .pay-scroll{border:1px solid var(--a-line)!important;border-radius:14px!important;overflow:auto;background:transparent!important}
body #mainApp .growth-table,body #mainApp .closed-table,body #mainApp .pay-table{width:100%;border-collapse:collapse!important;border-spacing:0!important;background:transparent!important}
body #mainApp .growth-table th,body #mainApp .closed-table th,body #mainApp .pay-table th{padding:12px 16px!important;background:var(--a-surface2)!important;border:0!important;border-bottom:1px solid var(--a-line)!important;color:var(--a-dim)!important;font:800 11px Inter,sans-serif!important;letter-spacing:.9px!important;text-transform:uppercase!important;text-align:left!important;white-space:nowrap}
body #mainApp .growth-table td,body #mainApp .closed-table td,body #mainApp .pay-table td{padding:13px 16px!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--a-line)!important;color:var(--a-text)!important;font-size:13.5px!important;text-align:left!important;white-space:nowrap}
body #mainApp .growth-table tr:last-child td,body #mainApp .closed-table tr:last-child td,body #mainApp .pay-table tr:last-child td{border-bottom:0!important}
body #mainApp .growth-table tbody tr,body #mainApp .closed-table tbody tr,body #mainApp .pay-table tbody tr{background:transparent!important;transition:background .12s}
body #mainApp .growth-table tbody tr:hover,body #mainApp .closed-table tbody tr:hover,body #mainApp .pay-table tbody tr:hover{background:var(--a-surface2)!important}
body #mainApp .growth-table tbody tr:hover td,body #mainApp .closed-table tbody tr:hover td{background:transparent!important}
body #mainApp .growth-table td:first-child{color:var(--a-dim)!important;font-weight:700;width:56px}
body #mainApp .growth-table td:nth-child(2){font-family:ui-monospace,Consolas,monospace!important;font-weight:600}
body #mainApp .growth-positive{color:var(--a-green)!important;font-weight:700}
body #mainApp .growth-negative{color:var(--a-red)!important;font-weight:700}
body #mainApp .growth-control,body #mainApp .pool-status{height:32px;padding:0 12px!important;border-radius:9px!important;font:700 12px Inter,sans-serif!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;cursor:pointer}
body #mainApp .growth-control.is-enabled{color:var(--a-red)!important;border-color:rgba(255,92,114,.35)!important;background:var(--a-red-bg)!important}
body #mainApp .growth-control.is-disabled{color:var(--a-green)!important;border-color:rgba(47,224,138,.35)!important;background:var(--a-green-bg)!important}
body #mainApp .growth-control.is-pending{color:#fff!important;border:0!important;background:var(--a-grad)!important}

/* ---------- Followers page ---------- */
body #mainApp .followers-panel{padding:24px!important;margin-bottom:20px!important}
body #mainApp .followers-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px!important;padding:0!important;border:0!important;background:transparent!important}
body #mainApp .followers-head h2{margin:0 0 4px!important;font:800 24px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mainApp .followers-subtitle{margin:0!important;color:var(--a-muted)!important;font-size:13.5px!important}
body #mainApp .followers-pill,body #mainApp .positions-market-tag{display:inline-flex;align-items:center;gap:8px;padding:7px 12px!important;border-radius:100px!important;background:var(--a-green-bg)!important;border:1px solid rgba(47,224,138,.28)!important;color:var(--a-green)!important;font-size:12px!important;font-weight:800!important;letter-spacing:.5px}
body #mainApp .followers-live-dot,body #mainApp .positions-market-tag span,body #mainApp .positions-footer-dot,body #mainApp .mt5-status-dot,body #mainApp .mt5-footer-dot{width:7px!important;height:7px!important;border-radius:50%!important;background:var(--a-green)!important;box-shadow:0 0 10px var(--a-green)!important}
body #mainApp .demo-pool-counts{display:flex;flex-wrap:wrap;gap:6px}
body #mainApp .demo-pool-counts span{padding:6px 10px;border-radius:100px;border:1px solid var(--a-line);background:var(--a-surface2);color:var(--a-muted);font-size:12px;font-weight:700}
body #mainApp .demo-pool-form{display:grid!important;grid-template-columns:1fr 1fr 1.2fr 1.4fr auto;gap:10px!important;margin-bottom:16px!important;padding:0!important;background:transparent!important;border:0!important}
body #mainApp .demo-pool-form input,body #mainApp .pay-field input,body #mainApp .pay-field select,body #mainApp .pay-field textarea{height:42px;padding:0 13px!important;border-radius:11px!important;background:var(--a-surface2)!important;border:1px solid var(--a-line2)!important;color:var(--a-text)!important;font:500 13.5px Inter,sans-serif!important}
body #mainApp .demo-pool-form button,body #mainApp .pay-btn.primary{height:42px!important;padding:0 18px!important;border-radius:11px!important;border:0!important;background:var(--a-grad)!important;color:#fff!important;font:700 13.5px Inter,sans-serif!important;cursor:pointer;box-shadow:0 10px 24px rgba(83,120,255,.28)!important}
@media(max-width:900px){body #mainApp .demo-pool-form{grid-template-columns:1fr 1fr}}

/* ---------- Account status (MT5) ---------- */
body #mainApp .mt5-page{max-width:1080px;margin:0 auto;display:grid;gap:20px}
body #mainApp .mt5-account-card{padding:26px!important}
body #mainApp .mt5-account-top{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-direction:row!important;gap:16px;margin-bottom:22px!important;text-align:left!important}
body #mainApp .mt5-account-brand{display:flex!important;flex-direction:row!important;align-items:center!important;gap:14px;text-align:left!important}
body #mainApp .mt5-account-icon{width:52px!important;height:52px!important;border-radius:16px!important;background:var(--a-grad)!important;color:#fff!important;font:800 16px Manrope,Inter,sans-serif!important;display:grid!important;place-items:center;box-shadow:0 12px 28px rgba(83,120,255,.35)!important;margin:0!important}
body #mainApp .mt5-account-icon span{color:#fff!important}
body #mainApp .mt5-account-brand h2{margin:0 0 3px!important;font:800 22px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mainApp .mt5-account-brand p{margin:0!important;color:var(--a-muted)!important;font-size:13.5px!important}
body #mainApp .mt5-account-status{display:inline-flex!important;align-items:center;gap:8px;padding:8px 14px!important;border-radius:100px!important;background:var(--a-green-bg)!important;border:1px solid rgba(47,224,138,.3)!important;color:var(--a-green)!important;font-size:12.5px!important;font-weight:800!important;margin:0!important}
body #mainApp .mt5-account-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}
body #mainApp .mt5-detail{padding:18px!important;border-radius:16px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important;text-align:left!important}
html[data-theme="light"] body #mainApp .mt5-detail{background:var(--a-surface2)!important}
body #mainApp .mt5-detail-icon{width:34px!important;height:34px!important;border-radius:10px!important;margin:0 0 14px!important;display:grid!important;place-items:center;font-size:15px!important;font-weight:800}
body #mainApp .mt5-detail-icon.blue{background:var(--a-blue-bg)!important;color:var(--a-accent)!important}
body #mainApp .mt5-detail-icon.purple{background:var(--a-violet-bg)!important;color:var(--a-accent2)!important}
body #mainApp .mt5-detail-icon.green{background:var(--a-green-bg)!important;color:var(--a-green)!important}
body #mainApp .mt5-detail-icon.orange{background:var(--a-amber-bg)!important;color:var(--a-amber)!important}
body #mainApp .mt5-detail-label{color:var(--a-dim)!important;font-size:10.5px!important;font-weight:800!important;letter-spacing:1px!important}
body #mainApp .mt5-detail-value{margin:6px 0 4px!important;font:800 19px Manrope,Inter,sans-serif!important;color:var(--a-text)!important;overflow-wrap:anywhere}
body #mainApp .mt5-detail-note{color:var(--a-dim)!important;font-size:12px!important}
body #mainApp .mt5-account-footer{display:flex!important;justify-content:space-between;gap:12px;margin-top:20px!important;padding-top:16px!important;border-top:1px solid var(--a-line)!important;background:transparent!important;color:var(--a-dim)!important;font-size:12px!important}
body #mainApp .mt5-account-footer span{display:inline-flex;align-items:center;gap:8px}
body #mainApp .mt5-account-footer b{color:var(--a-green)!important}
body #mainApp .mt5-raw-info{padding:16px 18px!important;border-radius:14px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important;color:var(--a-muted)!important;font:500 13px/1.7 ui-monospace,Consolas,monospace!important;white-space:pre-wrap}
body #mainApp .master-tg-panel{padding:22px!important}
body #mainApp .master-tg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}
body #mainApp .master-tg-head h3{margin:0 0 4px!important;font:800 18px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mainApp .master-tg-head p{margin:0!important;color:var(--a-muted)!important;font-size:13.5px}
body #mainApp .master-tg-actions button,body #followerSettingsModal .fs-tg-actions button{height:40px!important;padding:0 16px!important;border-radius:11px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;font:700 13px Inter,sans-serif!important;cursor:pointer}
body #mainApp #masterTgConnect,body #followerSettingsModal #tgConnectBtn{background:var(--a-grad)!important;border:0!important;color:#fff!important}
body #mainApp .master-tg-actions button:disabled,body #followerSettingsModal .fs-tg-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:1000px){body #mainApp .mt5-account-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* ---------- Open positions ---------- */
body #mainApp .positions-page{max-width:none;margin:0}
body #mainApp .positions-panel{overflow:hidden;padding:0!important}
body #mainApp .positions-panel-header{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--a-line)!important}
body #mainApp .positions-panel-title{display:flex;align-items:center;gap:12px}
body #mainApp .positions-title-icon{width:40px!important;height:40px!important;border-radius:12px!important;background:var(--a-grad)!important;color:#fff!important;display:grid!important;place-items:center;font-size:18px!important}
body #mainApp .positions-panel-title h2{margin:0!important;font:800 18px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mainApp .positions-panel-title p{margin:2px 0 0!important;color:var(--a-muted)!important;font-size:12.5px!important}
body #mainApp .positions-table-scroll{padding:0!important;background:transparent!important}
body #mainApp .pos-table{min-width:880px}
body #mainApp .pos-head,body #mainApp .pos-row{display:grid!important;grid-template-columns:1.1fr 1fr .7fr .7fr 1fr 1fr 1fr 1fr .9fr .8fr!important;align-items:center;gap:8px;padding:0 22px!important}
body #mainApp .pos-head{height:44px;background:var(--a-surface2)!important;border:0!important;border-bottom:1px solid var(--a-line)!important;color:var(--a-dim)!important;font:800 11px Inter,sans-serif!important;letter-spacing:.9px;text-transform:uppercase}
body #mainApp .pos-row{min-height:58px;background:transparent!important;border:0!important;border-bottom:1px solid var(--a-line)!important;color:var(--a-text)!important;font-size:13.5px!important}
body #mainApp .pos-row:hover{background:var(--a-surface2)!important}
body #mainApp .pos-row span{color:var(--a-text)}
body #mainApp .pos-row span:first-child{font-family:ui-monospace,Consolas,monospace;color:var(--a-muted)!important}
body #mainApp .pos-buy,body #mainApp .pos-sell{display:inline-flex!important;justify-content:center;width:max-content;padding:3px 9px!important;border-radius:7px!important;font-size:11.5px!important;font-weight:800!important;letter-spacing:.5px}
body #mainApp .pos-buy{background:var(--a-green-bg)!important;color:var(--a-green)!important}
body #mainApp .pos-sell{background:var(--a-red-bg)!important;color:var(--a-red)!important}
body #mainApp .pos-profit{color:var(--a-green)!important;font-weight:800!important}
body #mainApp .pos-loss{color:var(--a-red)!important;font-weight:800!important}
body #mainApp .pos-close{height:32px!important;padding:0 14px!important;border-radius:9px!important;border:1px solid rgba(255,92,114,.35)!important;background:var(--a-red-bg)!important;color:var(--a-red)!important;font:700 12px Inter,sans-serif!important;cursor:pointer}
body #mainApp .pos-close:hover{background:var(--a-red)!important;color:#fff!important}
body #mainApp .no-pos{padding:56px 20px!important;text-align:center;color:var(--a-muted)!important;font-size:14px}
body #mainApp .positions-panel-footer{display:flex!important;justify-content:space-between;gap:12px;padding:14px 22px!important;background:transparent!important;border:0!important;border-top:1px solid var(--a-line)!important;color:var(--a-dim)!important;font-size:12px!important}
body #mainApp .positions-panel-footer span{display:inline-flex;align-items:center;gap:8px}

/* ---------- Closed trades ---------- */
body #mainApp .closed-history{margin:0!important;padding:24px!important}
body #mainApp .closed-toolbar{display:flex!important;align-items:center;flex-wrap:wrap;gap:8px!important;margin-bottom:14px!important;padding:0!important;background:transparent!important;border:0!important}
body #mainApp .closed-toolbar h2{margin:0 auto 0 0!important;font:800 22px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mainApp #closedAccount{padding:6px 12px;border-radius:100px;border:1px solid var(--a-line);background:var(--a-surface2);color:var(--a-muted)!important;font-size:12px;font-weight:700}
body #mainApp #closedRange{padding:0 6px;color:var(--a-text)!important;font-size:13px!important;font-weight:700}
body #mainApp .closed-summary{display:grid!important;grid-template-columns:repeat(2,minmax(0,220px));gap:12px!important;margin:6px 0 10px!important;padding:0!important;background:transparent!important;border:0!important}
body #mainApp .closed-summary>span{display:flex!important;flex-direction:column;gap:4px;padding:14px 16px!important;border-radius:14px!important;border:1px solid var(--a-line)!important;background:var(--a-surface2)!important;color:var(--a-dim)!important;font-size:11px!important;font-weight:800!important;letter-spacing:.8px;text-transform:uppercase;text-align:left!important}
body #mainApp .closed-summary b{font:800 22px Manrope,Inter,sans-serif!important;letter-spacing:-.01em;text-transform:none;color:var(--a-text)}
body #mainApp .closed-note{margin:0 0 14px!important;color:var(--a-dim)!important;font-size:12px!important}
body #mainApp .closed-table td:nth-child(3){font-weight:800!important}
body #mainApp .closed-pagination{justify-content:center;margin:16px 0 0!important}
body #mainApp .closed-pagination span{color:var(--a-muted);font-size:13px;font-weight:600;padding:0 8px}

/* ---------- Payout ---------- */
body #mainApp .payout-page{max-width:none;padding:0!important}
body #mainApp .pay-cards{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:14px!important;margin-bottom:16px!important}
body #mainApp .pay-card{padding:18px!important;border-radius:16px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important;box-shadow:var(--a-shadow);text-align:left!important}
html[data-theme="light"] body #mainApp .pay-card{background:#fff!important}
body #mainApp .pay-card span{display:block;color:var(--a-dim)!important;font-size:10.5px!important;font-weight:800!important;letter-spacing:1px!important;text-transform:uppercase}
body #mainApp .pay-card strong{display:block;margin:8px 0 4px!important;font:800 24px Manrope,Inter,sans-serif!important;color:var(--a-text)}
body #mainApp .pay-card strong.accent{background:var(--a-grad);-webkit-background-clip:text;background-clip:text;color:transparent!important}
body #mainApp .pay-card small{color:var(--a-dim)!important;font-size:12px!important}
body #mainApp .pay-duebox{display:flex!important;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px!important;padding:22px 24px!important;border-radius:var(--a-radius)!important;border:1px solid var(--a-line2)!important;
  background:radial-gradient(circle at 0 0,rgba(83,164,255,.16),transparent 50%),radial-gradient(circle at 100% 100%,rgba(149,102,255,.16),transparent 50%),var(--a-surface)!important}
body #mainApp .pay-duebox span{display:block;color:var(--a-muted)!important;font-size:12px!important;font-weight:800!important;letter-spacing:1px;text-transform:uppercase}
body #mainApp .pay-duebox strong{display:block;margin-top:4px;font:800 34px Manrope,Inter,sans-serif!important;color:var(--a-text)}
body #mainApp .pay-duebox small{color:var(--a-muted)!important}
body #mainApp .pay-h2{margin:6px 0 12px!important;font:800 18px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mainApp .pay-scroll{margin-bottom:24px!important}
body #mainApp .pay-empty{padding:28px!important;text-align:center!important;color:var(--a-muted)!important;white-space:normal!important}
body #mainApp .pay-badge{display:inline-flex;align-items:center;padding:4px 10px!important;border-radius:100px!important;font-size:11.5px!important;font-weight:800!important;border:1px solid transparent!important}
body #mainApp .pay-alert{padding:16px 18px!important;border-radius:14px!important;border:1px solid rgba(255,194,77,.3)!important;background:var(--a-amber-bg)!important;color:var(--a-text)!important;margin-bottom:16px!important}
body #mainApp .pay-alert.danger{border-color:rgba(255,92,114,.35)!important;background:var(--a-red-bg)!important}
body #mainApp .pay-alert.info{border-color:rgba(83,164,255,.35)!important;background:var(--a-blue-bg)!important}
body #mainApp .pay-alert p{color:var(--a-muted)!important}
body #mainApp .pay-link{border:0!important;background:transparent!important;color:var(--a-link)!important;font-weight:700!important;cursor:pointer;padding:0!important}
body #mainApp .pay-warn{color:var(--a-amber)!important}
body #mainApp .pay-loading{padding:40px;text-align:center;color:var(--a-muted)}
@media(max-width:1200px){body #mainApp .pay-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* ---------- Market / trading terminal ---------- */
body #mainApp #chart.page{background:var(--a-bg2)!important}
body #mainApp .t2a-terminal{background:var(--a-bg2)!important}
body #mainApp .terminal-header{background:var(--a-head)!important;border-bottom:1px solid var(--a-line)!important}
body #mainApp .terminal-brand strong{font-family:Manrope,Inter,sans-serif!important;color:var(--a-text)!important;letter-spacing:.5px}
body #mainApp .terminal-symbol select,body #mainApp .terminal-settings-group>summary,body #mainApp #chartFullscreenBtn,body #mainApp .chart-mobile-menu-btn{border-radius:10px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;font-weight:700!important}
body #mainApp .terminal-timeframes{gap:2px!important;padding:3px!important;border-radius:11px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important}
body #mainApp .terminal-timeframes button{border-radius:8px!important;border:0!important;background:transparent!important;color:var(--a-muted)!important;font:700 12px Inter,sans-serif!important}
body #mainApp .terminal-timeframes button:hover{color:var(--a-text)!important}
body #mainApp .terminal-timeframes button.active{background:var(--a-grad)!important;color:#fff!important}
body #mainApp .terminal-live{color:var(--a-muted)!important;font-weight:600}
body #mainApp .terminal-live-dot{background:var(--a-green)!important;box-shadow:0 0 10px var(--a-green)!important}
body #mainApp .chart-dropdown{border-radius:14px!important;border:1px solid var(--a-line2)!important;background:var(--a-solid)!important;box-shadow:var(--a-shadow)!important}
body #mainApp .chart-dropdown button,body #mainApp .chart-dropdown select{border-radius:9px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important}
body #mainApp .chart-dropdown button.active{background:var(--a-blue-bg)!important;border-color:rgba(83,164,255,.45)!important;color:var(--a-link)!important}
body #mainApp .toolbar{background:var(--a-bg2)!important;border-right:1px solid var(--a-line)!important}
body #mainApp .toolbar .tool{border-radius:10px!important;border:1px solid transparent!important;background:transparent!important;color:var(--a-muted)!important}
body #mainApp .toolbar .tool:hover{background:var(--a-surface2)!important;color:var(--a-text)!important}
body #mainApp .toolbar .tool.active{background:var(--a-blue-bg)!important;border-color:rgba(83,164,255,.4)!important;color:var(--a-link)!important}
body #mainApp .chart-wrap{background:var(--a-bg2)!important}
body #mainApp #overlayInfo{border-radius:9px;background:var(--a-head)!important;border:1px solid var(--a-line)!important;color:var(--a-muted)!important}
body #mainApp .terminal-trading-panel{background:var(--a-bg2)!important;border-left:1px solid var(--a-line)!important}
body #mainApp .terminal-stat{border-radius:12px!important;border:1px solid var(--a-line)!important;background:var(--a-surface)!important}
body #mainApp .terminal-stat span{color:var(--a-dim)!important;font-weight:700!important;letter-spacing:.4px}
body #mainApp .terminal-stat strong{font-family:Manrope,Inter,sans-serif!important;font-weight:800!important}
body #mainApp .terminal-lot-toggle{padding:3px!important;border-radius:12px!important;background:var(--a-surface)!important;border:1px solid var(--a-line)!important}
body #mainApp .terminal-lot-toggle button{border-radius:9px!important;border:0!important;background:transparent!important;color:var(--a-muted)!important;font-weight:700!important}
body #mainApp .terminal-lot-toggle button.selected{background:var(--a-grad)!important;color:#fff!important}
body #mainApp .terminal-field label{color:var(--a-muted)!important;font-weight:600!important}
body #mainApp .terminal-field input{border-radius:10px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;font-weight:600!important}
body #mainApp .terminal-field input:focus{border-color:var(--a-accent)!important;outline:none;box-shadow:0 0 0 3px rgba(83,164,255,.16)}
body #mainApp .chart-quick-trade .buy-btn,body #mainApp .mobile-trade-bar .buy-btn{border-radius:12px!important;border:0!important;background:linear-gradient(135deg,#1fbf75,#2fe08a)!important;color:#feffff!important;box-shadow:0 10px 24px rgba(47,224,138,.25)!important}
body #mainApp .chart-quick-trade .sell-btn,body #mainApp .mobile-trade-bar .sell-btn{border-radius:12px!important;border:0!important;background:linear-gradient(135deg,#e2384f,#ff5c72)!important;color:#fff!important;box-shadow:0 10px 24px rgba(255,92,114,.25)!important}
body #mainApp .chart-quick-trade .buy-btn span,body #mainApp .chart-quick-trade .sell-btn span{font-weight:800!important}
body #mainApp .terminal-close-all{border-radius:11px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;font-weight:700!important}
body #mainApp .terminal-close-all:hover{border-color:rgba(255,92,114,.5)!important;color:var(--a-red)!important}
body #mainApp .terminal-divider{background:var(--a-line)!important}
body #mainApp .terminal-positions-title{color:var(--a-muted)!important;font-weight:800!important;letter-spacing:.4px}
body #mainApp .terminal-position{border-radius:11px!important;border:1px solid var(--a-line)!important;background:var(--a-surface)!important}
body #mainApp .terminal-position .side.buy{color:var(--a-green)!important}
body #mainApp .terminal-position .side.sell{color:var(--a-red)!important}
body #mainApp .terminal-empty{color:var(--a-dim)!important}
body #mainApp .terminal-footer{background:var(--a-head)!important;border-top:1px solid var(--a-line)!important}
body #mainApp .terminal-news-label{background:var(--a-surface)!important;border-color:var(--a-line)!important;color:var(--a-muted)!important}
body #mainApp .terminal-news-track{color:var(--a-muted)!important}

/* ---------- Ask AI floating button ---------- */
body #askAI #aiToggle{border-radius:14px!important;border:0!important;background:var(--a-grad)!important;color:#fff!important;font:700 13.5px Inter,sans-serif!important;box-shadow:0 14px 34px rgba(83,120,255,.4)!important}
body #askAI #aiPanel{border-radius:20px!important;border:1px solid var(--a-line2)!important;background:var(--a-solid)!important;box-shadow:0 30px 80px rgba(0,0,0,.45)!important}
body #askAI .ai-head{background:transparent!important;border-bottom:1px solid var(--a-line)!important}

/* ---------- Modals: shared ---------- */
body .mt5-modal,body .fs-modal{background:rgba(2,6,14,.62)!important;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
html[data-theme="light"] body .mt5-modal,html[data-theme="light"] body .fs-modal{background:rgba(18,27,45,.35)!important}
body #mt5LoginModal .mt5-login-box,body #followerSettingsModal .fs-box,body #accountSecurityModal{border-radius:22px!important;border:1px solid var(--a-line2)!important;background:var(--a-solid)!important;color:var(--a-text)!important;box-shadow:0 30px 80px rgba(0,0,0,.5)!important;overflow:hidden}
html[data-theme="light"] body #mt5LoginModal .mt5-login-box,html[data-theme="light"] body #followerSettingsModal .fs-box,html[data-theme="light"] body #accountSecurityModal{background:#fff!important;box-shadow:0 24px 60px rgba(20,40,80,.18)!important}
body #accountSecurityModal::backdrop{background:rgba(2,6,14,.62);backdrop-filter:blur(6px)}

/* MT5 connect */
body #mt5LoginModal .mt5-login-box{padding:26px!important;width:min(460px,calc(100vw - 32px))!important}
body #mt5LoginModal .mt5-login-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px!important;padding:0!important;background:transparent!important;border:0!important}
body #mt5LoginModal .mt5-login-header strong{font:800 20px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #mt5LoginModal #mt5ModalClose,body #followerSettingsModal #fsClose,body #accountSecurityModal #securityCloseBtn,body #profileSidebar #profileClose{width:36px!important;height:36px!important;min-width:36px;padding:0!important;border-radius:10px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-muted)!important;font-size:14px!important;cursor:pointer}
body #mt5LoginModal #mt5ModalClose:hover,body #followerSettingsModal #fsClose:hover,body #accountSecurityModal #securityCloseBtn:hover,body #profileSidebar #profileClose:hover{color:var(--a-text)!important;border-color:var(--a-accent)!important}
body #mt5LoginModal .mt5-warning{margin:0 0 16px!important;padding:12px 14px!important;border-radius:12px!important;border:1px solid rgba(255,194,77,.3);background:var(--a-amber-bg);color:var(--a-muted)!important;font-size:12.5px!important;line-height:1.55!important;text-align:left!important;font-weight:500!important}
body #mt5LoginModal .mt5-warning strong{color:var(--a-amber)}
body #mt5LoginModal .mt5-warning a{color:var(--a-link)!important;font-weight:700}
body #mt5LoginModal label,body #accountSecurityModal label{display:block;margin:12px 0 6px!important;color:var(--a-text)!important;font-size:12.5px!important;font-weight:600!important}
body #mt5LoginModal input,body #mt5LoginModal select,body #accountSecurityModal input,body #followerSettingsModal .fs-grid input{width:100%;height:46px!important;padding:0 14px!important;border-radius:12px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface2)!important;color:var(--a-text)!important;font:500 14px Inter,sans-serif!important;box-sizing:border-box}
html:not([data-theme="light"]) body #mt5LoginModal select option{background:#0a1322}
body #mt5LoginModal input:focus,body #mt5LoginModal select:focus,body #accountSecurityModal input:focus,body #followerSettingsModal .fs-grid input:focus{border-color:var(--a-accent)!important;outline:none;box-shadow:0 0 0 4px rgba(83,164,255,.15)!important}
body #mt5LoginModal .demo-pool-info{margin:10px 0 0!important;padding:12px 14px!important;border-radius:12px!important;border:1px solid rgba(47,224,138,.25)!important;background:var(--a-green-bg)!important;color:var(--a-muted)!important;font-size:12.5px!important}
body #mt5LoginModal #mt5ConnectBtn,body #mt5LoginModal #mt5ReconnectBtn,body #accountSecurityModal .auth-main-btn{width:100%;height:48px!important;margin-top:16px!important;border-radius:13px!important;border:0!important;background:var(--a-grad)!important;color:#fff!important;font:700 15px Inter,sans-serif!important;cursor:pointer;box-shadow:0 12px 28px rgba(83,120,255,.32)!important}
body #mt5LoginModal #mt5LoginMessage{margin-top:10px;color:var(--a-muted);font-size:13px;text-align:center}
body #mt5LoginModal .agent-panel{margin-top:6px;padding-top:6px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
body #mt5LoginModal .agent-panel button{height:42px!important;margin:0!important;border-radius:11px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;font:700 12.5px Inter,sans-serif!important;cursor:pointer;width:100%}
body #mt5LoginModal .agent-panel button:hover{border-color:var(--a-accent)!important}
body #mt5LoginModal #agentPair{grid-column:1/-1;height:46px!important;border:0!important;background:var(--a-grad)!important;color:#fff!important}
body #mt5LoginModal #agentRevoke{color:var(--a-red)!important;border-color:rgba(255,92,114,.35)!important}
body #mt5LoginModal #agentMessage{grid-column:1/-1;margin:4px 0 0;padding:12px;border-radius:11px;background:var(--a-surface2);border:1px solid var(--a-line);color:var(--a-muted);font:500 12px/1.6 ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
body #mt5LoginModal #agentMessage:empty{display:none}

/* Trading settings */
body #followerSettingsModal .fs-box{width:min(560px,calc(100vw - 32px))!important;max-height:calc(100vh - 40px)!important;display:flex;flex-direction:column}
body #followerSettingsModal .fs-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px 24px!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--a-line)!important}
body #followerSettingsModal .fs-header h2{margin:0 0 3px!important;font:800 20px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #followerSettingsModal .fs-header p{margin:0!important;color:var(--a-muted)!important;font-size:13px!important}
body #followerSettingsModal form{display:flex;flex-direction:column;min-height:0;flex:1}
body #followerSettingsModal .fs-body{padding:8px 24px 18px!important;overflow-y:auto}
body #followerSettingsModal .fs-section{margin:20px 0 10px!important;padding:0!important;background:transparent!important;border:0!important;color:var(--a-dim)!important;font-size:11px!important;font-weight:800!important;letter-spacing:1.3px!important}
body #followerSettingsModal .fs-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px!important;margin-bottom:8px;border-radius:14px!important;border:1px solid var(--a-line)!important;background:var(--a-surface)!important}
html[data-theme="light"] body #followerSettingsModal .fs-row{background:var(--a-surface2)!important}
body #followerSettingsModal .fs-row strong{display:block;color:var(--a-text)!important;font-size:14px!important;font-weight:700!important}
body #followerSettingsModal .fs-row small{display:block;margin-top:2px;color:var(--a-muted)!important;font-size:12px!important}
body #followerSettingsModal .fs-row input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:44px!important;height:26px!important;margin:0;border-radius:100px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface2)!important;position:relative;cursor:pointer;transition:background .2s}
body #followerSettingsModal .fs-row input[type=checkbox]::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);transition:transform .2s}
body #followerSettingsModal .fs-row input[type=checkbox]:checked{background:var(--a-grad)!important;border-color:transparent!important}
body #followerSettingsModal .fs-row input[type=checkbox]:checked::after{transform:translateX(18px)}
body #followerSettingsModal .fs-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
body #followerSettingsModal .fs-grid label{display:flex;flex-direction:column;gap:6px;color:var(--a-text)!important;font-size:12.5px!important;font-weight:600!important}
body #followerSettingsModal .fs-note{margin-top:10px!important;padding:12px 14px!important;border-radius:12px!important;border:1px solid rgba(83,164,255,.25)!important;background:var(--a-blue-bg)!important;color:var(--a-muted)!important;font-size:12.5px!important}
body #followerSettingsModal #tgStatus{font-size:12.5px;font-weight:800}
body #followerSettingsModal .fs-tg-actions{display:flex;gap:8px;margin-top:4px}
body #followerSettingsModal #tgConnectLink{display:inline-block;margin-top:10px;color:var(--a-link)!important;font-weight:700}
body #followerSettingsModal .fs-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px!important;background:transparent!important;border:0!important;border-top:1px solid var(--a-line)!important}
body #followerSettingsModal .fs-footer button{height:44px!important;padding:0 20px!important;border-radius:12px!important;font:700 14px Inter,sans-serif!important;cursor:pointer;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important}
body #followerSettingsModal #fsSave{border:0!important;background:var(--a-grad)!important;color:#fff!important;box-shadow:0 10px 24px rgba(83,120,255,.3)!important}
body #followerSettingsModal #fsMessage,body #followerSettingsModal #tgMessage{margin-top:8px;font-size:12.5px;color:var(--a-muted)}

/* Account security dialog */
body #accountSecurityModal{padding:26px!important;width:min(440px,calc(100vw - 32px))!important}
body #accountSecurityModal .security-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
body #accountSecurityModal .security-heading strong{font:800 20px Manrope,Inter,sans-serif;color:var(--a-text)}
body #accountSecurityModal .auth-message{margin-top:10px;text-align:center;font-size:13px}

/* Profile drawer */
body .profile-overlay{background:rgba(2,6,14,.55)!important;backdrop-filter:blur(4px)}
body #profileSidebar{width:min(340px,92vw)!important;background:var(--a-solid)!important;border-left:1px solid var(--a-line2)!important;box-shadow:-30px 0 80px rgba(0,0,0,.4)!important;color:var(--a-text)!important;display:flex;flex-direction:column}
html[data-theme="light"] body #profileSidebar{background:#fff!important;box-shadow:-20px 0 60px rgba(20,40,80,.12)!important}
body #profileSidebar .profile-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--a-line)!important}
body #profileSidebar .profile-sidebar-header strong{font:800 18px Manrope,Inter,sans-serif;color:var(--a-text)}
body #profileSidebar .profile-user{margin:16px 18px 6px!important;padding:16px!important;border-radius:16px!important;border:1px solid var(--a-line)!important;background:linear-gradient(135deg,rgba(83,164,255,.12),rgba(149,102,255,.10))!important}
body #profileSidebar .profile-user strong{display:block;color:var(--a-text)!important;font:800 16px Manrope,Inter,sans-serif}
body #profileSidebar .profile-user small{display:block;margin-top:2px;color:var(--a-muted)!important;font-size:12.5px;overflow-wrap:anywhere}
body #profileSidebar .profile-menu{display:flex;flex-direction:column;gap:2px;padding:10px 12px!important}
body #profileSidebar .profile-menu button,body #profileSidebar .profile-menu a{display:flex!important;align-items:center;gap:12px;height:46px;padding:0 12px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--a-muted)!important;font:600 14px Inter,sans-serif!important;text-decoration:none;cursor:pointer;text-align:left}
body #profileSidebar .profile-menu button:hover,body #profileSidebar .profile-menu a:hover{background:var(--a-surface2)!important;color:var(--a-text)!important}
body #profileSidebar .profile-menu span{color:inherit!important}
body #profileSidebar .profile-sidebar-bottom{margin-top:auto;padding:16px 18px!important;background:transparent!important;border:0!important;border-top:1px solid var(--a-line)!important}
body #profileSidebar #logoutBtn{width:100%;height:46px!important;border-radius:12px!important;border:1px solid rgba(255,92,114,.35)!important;background:var(--a-red-bg)!important;color:var(--a-red)!important;font:700 14px Inter,sans-serif!important;cursor:pointer}
body #profileSidebar #logoutBtn span{color:inherit!important}

/* Floating menus & toasts */
body .growth-menu{border-radius:14px!important;border:1px solid var(--a-line2)!important;background:var(--a-solid)!important;box-shadow:var(--a-shadow)!important;padding:6px!important}
body .growth-menu-item{border-radius:9px!important;border:0!important;background:transparent!important;color:var(--a-text)!important;font:600 13px Inter,sans-serif!important}
body .growth-menu-item:hover{background:var(--a-surface2)!important}
body .pay-dialog{border-radius:20px!important;border:1px solid var(--a-line2)!important;background:var(--a-solid)!important;color:var(--a-text)!important;box-shadow:0 30px 80px rgba(0,0,0,.5)!important}
body #toastBox .t2a-toast{border-radius:14px!important;background:var(--a-solid)!important;border:1px solid var(--a-line2)!important;color:var(--a-text)!important;box-shadow:var(--a-shadow)!important;font-family:Inter,sans-serif!important}

/* ---------- Responsive ---------- */
@media(max-width:1200px){
  body #mainApp .header-metric:nth-child(3){display:none}
}
@media(max-width:1000px){
  body #mainApp #dashboard .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body #mainApp .header-account{display:none!important}
}
@media(max-width:768px){
  body #mainApp{grid-template-columns:0 minmax(0,1fr)!important;grid-template-rows:62px minmax(0,1fr)!important}
  body #mainApp .header{grid-column:1/-1!important;height:62px!important;padding:0 10px!important}
  body #mainApp .sidebar{position:fixed!important;top:62px!important;bottom:0;left:0;width:264px!important;z-index:1001!important;box-shadow:30px 0 80px rgba(0,0,0,.4)}
  body #mainApp .side-brand{display:none!important}
  body #mainApp .page:not(#chart){padding:18px 14px 28px!important}
  body #mainApp .dash-heading,body #mainApp .positions-heading,body #mainApp .pay-head{flex-direction:column!important;align-items:flex-start!important}
  body #mainApp .header-metrics{gap:6px}
  body #mainApp .header-metric{padding:5px 9px!important}
  body #mainApp .header-metric strong{font-size:13px!important}
  body #mainApp .header-metric:nth-child(2){display:none}
  body #mainApp .header #masterStatus{height:36px;padding:0 10px!important;font-size:0!important}
  body #mainApp .header #masterStatus::before{font-size:12px!important}
  body #mainApp #themeToggle,body #mainApp .header .sidebar-toggle,body #mainApp .header #profileBtn{width:40px!important;height:40px!important;min-width:36px!important}
  body #mainApp .pay-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body #mainApp .pay-duebox{flex-direction:column;align-items:flex-start!important}
  body #mainApp .closed-summary{grid-template-columns:1fr 1fr}
  body #mainApp .history-page{padding:14px!important}
  body #mainApp .history-day{min-height:72px!important;padding:5px!important;border-radius:10px!important}
  body #mainApp .history-trade{padding:4px!important}
  body #mainApp .history-trade strong{font-size:11px!important}
  body #mainApp .history-trade small{display:none}
  body #mainApp .mt5-account-top{flex-direction:column!important;align-items:flex-start!important}
}
@media(max-width:520px){
  body #mainApp #dashboard .cards{grid-template-columns:1fr 1fr!important;gap:10px!important}
  body #mainApp #dashboard .card{padding:14px!important}
  body #mainApp #dashboard .card strong{font-size:20px!important}
  body #mainApp #dashboard .metric-icon{width:30px!important;height:30px!important;font-size:13px!important}
  body #mainApp #dashboard .card small{display:none}
  body #mainApp .mt5-account-grid{grid-template-columns:1fr 1fr!important}
  body #mainApp .history-calendar{gap:3px!important}
  body #mainApp .history-weekday{font-size:9px!important}
  body #followerSettingsModal .fs-grid{grid-template-columns:1fr!important}
}

/* ---------- Alignment fixes over legacy rules ---------- */
body #mainApp .header-metric{align-items:flex-start!important;text-align:left!important;gap:1px!important;border-right:1px solid var(--a-line)!important}
body #mainApp .header-metric::after,body #mainApp .header-metric::before{display:none!important}
body #mainApp #dashboard .dash-heading>div,body #mainApp #dashboard .dash-heading h1,body #mainApp #dashboard .dash-heading p{text-align:left!important}
body #mainApp #dashboard .card *{text-align:left!important}
body #mainApp #dashboard .card strong{font-variant-numeric:tabular-nums}
html[data-theme="light"] body #mainApp #dashboard .card strong:not(.positive):not(.negative){color:var(--a-text)!important}
body #mainApp .closed-history>.closed-toolbar:first-child{flex-direction:row!important;justify-content:space-between!important;padding-bottom:16px!important;margin-bottom:16px!important;border-bottom:1px solid var(--a-line)!important}
body #mainApp .closed-toolbar{justify-content:flex-start!important}
body #mainApp .closed-toolbar h2{justify-content:flex-start!important;margin:0!important;font-size:22px!important}
body #mainApp .closed-toolbar h2::before{content:""!important;width:6px!important;height:22px!important;border:0!important;border-radius:3px!important;background:var(--a-grad)!important}
body #mainApp .closed-summary{justify-content:start!important}
body #mainApp .closed-history .closed-table th,body #mainApp .closed-history .closed-table td{text-align:left!important}
body #mainApp .mt5-detail{min-height:0!important;align-items:flex-start!important;justify-content:flex-start!important;text-align:left!important}
body #mainApp .pay-head>div,body #mainApp .pay-head h1,body #mainApp .pay-head p{text-align:left!important}
body #mainApp .pay-head .dash-eyebrow{margin-bottom:12px!important}
body #mainApp .pay-table td.pos,body #mainApp .pay-card .pos{color:var(--a-green)!important}
body #mainApp .pay-table td.neg,body #mainApp .pay-card .neg,body #mainApp .pay-duebox .neg{color:var(--a-red)!important}
body #mainApp .pay-table td.strong{font-weight:800!important}
body #mainApp .pay-head>div{margin:0!important;flex:1}
body #mainApp .pay-head>.pay-btn{position:static!important}
body #mainApp .mt5-detail *{text-align:left!important}
body #mainApp .mt5-detail-icon{align-self:flex-start}

/* ---------- Mobile: trader cards & calendar ---------- */
@media(max-width:700px){
  body #mainApp #followers .followers-panel{padding:16px!important}
  body #mainApp #followers .growth-table-wrap{border:0!important;overflow:visible!important}
  body #mainApp #followers .growth-table tbody tr{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px 10px!important;padding:14px!important;border-radius:14px!important;border:1px solid var(--a-line)!important;background:var(--a-surface)!important}
  body #mainApp #followers .growth-table tbody td{padding:0!important;border:0!important;font-size:13.5px!important;white-space:normal!important}
  body #mainApp #followers .growth-table tbody td::before{color:var(--a-dim)!important;font-size:10px!important;font-weight:800!important;letter-spacing:.8px!important;text-transform:uppercase}
  body #mainApp #followers .growth-table tbody td:nth-child(1){width:auto!important}
  body #mainApp #followers .growth-table tbody td:nth-child(2){grid-column:span 2}
  body #mainApp #followers .growth-table tbody td:nth-child(7){grid-column:1/-1}
  body #mainApp #followers .growth-table tbody td:nth-child(7) .growth-control{width:100%}
  body #mainApp .followers-head{flex-direction:column;align-items:flex-start!important}
}
@media(max-width:768px){
  body #mainApp .history-trade{padding:3px 2px!important;border-radius:6px!important;text-align:center!important}
  body #mainApp .history-trade strong{font-size:9.5px!important;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:clip}
  body #mainApp .history-day-number{font-size:10.5px!important;margin-bottom:4px!important}
  body #mainApp .history-day{min-height:62px!important}
}
@media(max-width:520px){
  body #mainApp #dashboardHistory .history-page{padding:12px 8px!important}
  body #mainApp .history-calendar{gap:3px!important}
  body #mainApp .history-day{padding:4px 2px!important;min-height:56px!important;border-radius:8px!important}
  body #mainApp .history-day-number{padding-left:3px}
  body #mainApp .history-trade{padding:3px 1px!important}
  body #mainApp .history-trade strong{font-size:8.5px!important;letter-spacing:-.4px!important;text-overflow:clip}
}

/* ---------- Profit / loss colours: + green, − red ---------- */
body #mainApp #dashboard .card strong.positive,body #mainApp .header-metric strong.positive,body #mainApp .terminal-stat strong.positive,
body #mainApp .growth-table td.growth-positive,body #mainApp .closed-table td.positive,body #mainApp .closed-summary b.positive,
body #mainApp .pay-table td.pos,body #mainApp .pay-card strong.pos{color:var(--a-green)!important}
body #mainApp #dashboard .card strong.negative,body #mainApp .header-metric strong.negative,body #mainApp .terminal-stat strong.negative,
body #mainApp .growth-table td.growth-negative,body #mainApp .closed-table td.negative,body #mainApp .closed-summary b.negative,
body #mainApp .pay-table td.neg,body #mainApp .pay-card strong.neg,body #mainApp .pay-duebox strong.neg{color:var(--a-red)!important}

/* ---------- Connection states: connected green, disconnected red ---------- */
body #mainApp .mt5-detail-value.is-online{color:var(--a-green)!important}
body #mainApp .mt5-detail-value.is-offline{color:var(--a-red)!important}
body #mainApp .mt5-account-status.is-offline{background:var(--a-red-bg)!important;border-color:rgba(255,92,114,.35)!important;color:var(--a-red)!important}
body #mainApp .mt5-account-status.is-offline .mt5-status-dot{background:var(--a-red)!important;box-shadow:0 0 10px var(--a-red)!important}
body #mainApp #masterTgStatus,body #followerSettingsModal #tgStatus{padding:6px 12px;border-radius:100px;font-size:12px!important;font-weight:800!important;white-space:nowrap}
body #mainApp #masterTgStatus.connected,body #followerSettingsModal #tgStatus.connected{color:var(--a-green)!important;background:var(--a-green-bg)!important;border:1px solid rgba(47,224,138,.3)!important}
body #mainApp #masterTgStatus.disconnected,body #followerSettingsModal #tgStatus.disconnected{color:var(--a-red)!important;background:var(--a-red-bg)!important;border:1px solid rgba(255,92,114,.3)!important}
body #mainApp .terminal-live.online,body #mainApp .terminal-live.online #marketConnectionLabel{color:var(--a-green)!important}
body #mainApp .terminal-live.offline,body #mainApp .terminal-live.offline #marketConnectionLabel{color:var(--a-red)!important}
body #mainApp .terminal-live.offline .terminal-live-dot{background:var(--a-red)!important;box-shadow:0 0 10px var(--a-red)!important}
body #mainApp .terminal-live:not(.online):not(.offline) .terminal-live-dot{background:var(--a-amber)!important;box-shadow:0 0 10px var(--a-amber)!important}

/* Light theme: keep + green / − red over legacy light rules */
html[data-theme="light"] body #mainApp #dashboard .card strong.positive,html[data-theme="light"] body #mainApp .header-metric strong.positive,html[data-theme="light"] body #mainApp .growth-table td.growth-positive,html[data-theme="light"] body #mainApp .closed-table td.positive,html[data-theme="light"] body #mainApp .terminal-stat strong.positive{color:var(--a-green)!important}
html[data-theme="light"] body #mainApp #dashboard .card strong.negative,html[data-theme="light"] body #mainApp .header-metric strong.negative,html[data-theme="light"] body #mainApp .growth-table td.growth-negative,html[data-theme="light"] body #mainApp .closed-table td.negative,html[data-theme="light"] body #mainApp .terminal-stat strong.negative{color:var(--a-red)!important}

/* Chart area: pure black in dark theme */
html:not([data-theme="light"]) body #mainApp .chart-wrap,html:not([data-theme="light"]) body #mainApp #chartCanvas{background:var(--a-bg2,#050c18)!important}

/* ---------- Profile drawer v2 ---------- */
body:has(#profileSidebar.show) #askAI{display:none!important}
body #profileSidebar{padding:0!important;width:min(360px,92vw)!important;z-index:10000!important}
body .profile-overlay{z-index:9999!important}
body #profileSidebar .profile-sidebar-header{margin:0!important;padding:20px 20px 18px!important;font-size:inherit}
body #profileSidebar .profile-user{display:flex!important;align-items:center;gap:14px;margin:18px 18px 8px!important;padding:16px!important;border-radius:18px!important}
body #profileSidebar .pu-avatar{display:grid;place-items:center;flex:none;width:52px;height:52px;border-radius:16px;background:var(--a-grad);color:#fff;font:800 18px Manrope,Inter,sans-serif;letter-spacing:.5px;box-shadow:0 10px 24px rgba(83,120,255,.35)}
body #profileSidebar .pu-text{min-width:0}
body #profileSidebar .pu-text strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body #profileSidebar .pu-role{display:inline-flex;margin-top:8px;padding:3px 9px;border-radius:100px;background:var(--a-green-bg);border:1px solid rgba(47,224,138,.3);color:var(--a-green);font-size:10.5px;font-weight:800;letter-spacing:.8px;text-transform:uppercase}
body #profileSidebar .pu-role.is-master{background:var(--a-amber-bg);border-color:rgba(255,194,77,.35);color:var(--a-amber)}
body #profileSidebar .profile-menu{padding:6px 14px 12px!important;gap:2px!important;overflow-y:auto}
body #profileSidebar .pm-label{margin:16px 10px 6px;font-size:10.5px;font-weight:800;letter-spacing:1.3px;text-transform:uppercase;color:var(--a-dim)}
body #profileSidebar .profile-menu button,body #profileSidebar .profile-menu a{height:50px!important;gap:12px!important;padding:0 10px!important;border-radius:13px!important;color:var(--a-text)!important}
body #profileSidebar .pm-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;background:var(--a-surface2);border:1px solid var(--a-line);color:var(--a-muted)}
body #profileSidebar .pm-icon svg{width:17px;height:17px}
body #profileSidebar .pm-text{flex:1;color:inherit!important;font-weight:600}
body #profileSidebar .pm-ext{width:16px;height:16px;flex:none;color:var(--a-dim);transition:transform .15s,color .15s}
body #profileSidebar .profile-menu button:hover .pm-icon,body #profileSidebar .profile-menu a:hover .pm-icon{background:var(--a-blue-bg);border-color:rgba(83,164,255,.35);color:var(--a-accent)}
body #profileSidebar .profile-menu button:hover .pm-ext{transform:translateX(2px);color:var(--a-accent)}
body #profileSidebar .profile-menu a:hover .pm-ext{transform:translate(2px,-2px);color:var(--a-accent)}
body #profileSidebar .profile-sidebar-bottom{padding:16px 18px 18px!important}
body #profileSidebar #logoutBtn{display:flex!important;align-items:center;justify-content:center;gap:10px}
body #profileSidebar #logoutBtn .pm-icon{width:auto;height:auto;background:none;border:0;color:inherit}
body #profileSidebar #logoutBtn:hover{background:var(--a-red)!important;color:#fff!important;border-color:transparent!important}
body #profileSidebar .pm-foot{display:block;margin-top:12px;text-align:center;color:var(--a-dim);font-size:11.5px}

/* ==========================================================
   Modern sidebar: smooth collapse, rail tooltips, mobile drawer
   ========================================================== */
body #mainApp{transition:grid-template-columns .32s cubic-bezier(.4,0,.2,1)!important}
body #mainApp .header .sidebar-toggle{display:grid!important;place-items:center;padding:0!important;transition:border-color .15s,background .15s,color .15s,transform .12s!important}
body #mainApp .header .sidebar-toggle:hover{background:var(--a-surface2)!important;color:var(--a-accent)!important}
body #mainApp .header .sidebar-toggle:active{transform:scale(.92)}
body #mainApp .header .sidebar-toggle:focus-visible{outline:2px solid var(--a-accent);outline-offset:2px}
body #mainApp .st-icon{width:20px;height:20px;overflow:visible}
body #mainApp .st-fill{opacity:.22;transition:opacity .3s}
body #mainApp .st-chev{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.4,0,.2,1)}

/* text pieces fade instead of popping */
body #mainApp .side-brand span,body #mainApp .side-label,body #mainApp .nav-text{white-space:nowrap;transition:opacity .2s ease .08s}
body #mainApp .side-help-mini{display:none}
body #mainApp .side-help{min-width:212px}

@media(min-width:769px){
  body #mainApp .sidebar{padding:0 14px 16px!important}
  body #mainApp .nav-item{padding:0 11px!important}
  body #mainApp.collapsed .st-fill{opacity:0}
  body #mainApp.collapsed .st-chev{transform:rotate(180deg)}
  body #mainApp.collapsed .side-brand span,body #mainApp.collapsed .side-label,body #mainApp.collapsed .nav-text{opacity:0;pointer-events:none;transition-delay:0s;transition-duration:.12s}
  body #mainApp.collapsed .side-label{position:relative}
  body #mainApp.collapsed .side-label::after{content:"";position:absolute;left:4px;right:4px;top:50%;height:1px;background:var(--a-line);opacity:1}
  body #mainApp.collapsed .side-help{display:none}
  body #mainApp.collapsed .side-help-mini{display:grid;place-items:center;flex:none;margin-top:auto;width:44px;height:44px;border-radius:12px;border:1px solid var(--a-line);background:linear-gradient(135deg,rgba(83,164,255,.12),rgba(149,102,255,.10));color:var(--a-link);transition:border-color .15s,color .15s;animation:t2aSideIn .3s ease}
  body #mainApp.collapsed .side-help-mini:hover{border-color:var(--a-accent);color:var(--a-accent)}
  body #mainApp.collapsed .side-help-mini svg{width:20px;height:20px}
  body #mainApp:not(.collapsed) .side-help{animation:t2aSideIn .35s ease .1s both}
}
@keyframes t2aSideIn{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:none}}

/* tooltip for the collapsed rail */
.t2a-nav-tip{position:fixed;z-index:10050;left:0;top:0;padding:7px 11px;border-radius:9px;background:var(--a-solid,#111a2b);color:var(--a-text,#e8eef8);border:1px solid var(--a-line2,#26364e);box-shadow:0 10px 30px rgba(0,0,0,.35);font:600 12.5px Inter,system-ui,sans-serif;white-space:nowrap;pointer-events:none;opacity:0;transform:translate(-4px,-50%);transition:opacity .14s,transform .14s}
.t2a-nav-tip.show{opacity:1;transform:translate(0,-50%)}
.t2a-nav-tip::before{content:"";position:absolute;left:-5px;top:50%;width:8px;height:8px;background:inherit;border-left:1px solid var(--a-line2,#26364e);border-bottom:1px solid var(--a-line2,#26364e);transform:translateY(-50%) rotate(45deg)}
html[data-theme="light"] .t2a-nav-tip{box-shadow:0 10px 30px rgba(20,40,80,.15)}

/* mobile drawer + backdrop */
body #mainApp .sidebar-backdrop{display:none}
@media(max-width:768px){
  body #mainApp .st-chev{transform:rotate(180deg)}
  body #mainApp.mobile-open .st-chev{transform:none}
  body #mainApp .st-fill{opacity:0}
  body #mainApp.mobile-open .st-fill{opacity:.22}
  body #mainApp .sidebar{transform:translateX(-102%);transition:transform .32s cubic-bezier(.4,0,.2,1),box-shadow .32s!important;box-shadow:none!important;padding:8px 14px 16px!important}
  body #mainApp.mobile-open .sidebar{transform:none;box-shadow:24px 0 60px rgba(0,0,0,.35)!important}
  body #mainApp .sidebar-backdrop{display:block;position:fixed;inset:62px 0 0 0;z-index:1000;background:rgba(4,8,16,.55);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s}
  html[data-theme="light"] body #mainApp .sidebar-backdrop{background:rgba(15,23,42,.28)}
  body #mainApp.mobile-open .sidebar-backdrop{opacity:1;visibility:visible}
  body.t2a-sidebar-lock{overflow:hidden}
}
@media(prefers-reduced-motion:reduce){
  body #mainApp,body #mainApp .sidebar,body #mainApp .st-chev,body #mainApp .nav-text,body #mainApp .side-label,body #mainApp .side-brand span,body #mainApp .sidebar-backdrop{transition:none!important}
  body #mainApp .side-help,body #mainApp .side-help-mini{animation:none!important}
}

/* ---------- Toggle lives in the sidebar brand row on desktop ---------- */
body #mainApp .side-collapse-btn{display:none}
@media(min-width:769px){
  body #mainApp .header .sidebar-toggle{display:none!important}
  body #mainApp .side-brand{position:relative}
  body #mainApp .side-brand img{transition:opacity .18s}
  body #mainApp .side-collapse-btn{display:grid;place-items:center;flex:none;margin-left:auto;margin-right:12px;width:34px;height:34px;padding:0;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--a-muted);cursor:pointer;transition:background .15s,border-color .15s,color .15s,opacity .18s,transform .12s}
  body #mainApp .side-collapse-btn:hover{background:var(--a-surface2);border-color:var(--a-line2);color:var(--a-accent)}
  body #mainApp .side-collapse-btn:active{transform:scale(.92)}
  body #mainApp .side-collapse-btn:focus-visible{outline:2px solid var(--a-accent);outline-offset:2px}
  body #mainApp .side-collapse-btn .st-icon{width:19px;height:19px;overflow:visible}
  /* collapsed: logo shows, hovering the brand swaps it for the expand button */
  body #mainApp.collapsed .side-collapse-btn{position:absolute;left:18px;top:50%;margin:-17px 0 0;opacity:0;background:var(--a-surface);border-color:var(--a-line2)}
  body #mainApp.collapsed .side-brand:hover img,body #mainApp.collapsed .side-brand:has(.side-collapse-btn:focus-visible) img{opacity:0}
  body #mainApp.collapsed .side-brand:hover .side-collapse-btn,body #mainApp.collapsed .side-collapse-btn:focus-visible{opacity:1}
}

/* ---------- Profile photo: always a perfect circle ---------- */
body #mainApp .header #profileBtn{border-radius:50%!important;overflow:hidden!important;padding:0!important}
body #mainApp .header #profileBtn.has-photo{padding:2px!important;background:var(--a-grad)!important;border:0!important}
body #mainApp .header #profileBtn.has-photo img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;border:2px solid var(--a-bg)!important;display:block}
body #mainApp .header #profileBtn.has-photo:hover{box-shadow:0 0 0 3px rgba(83,164,255,.25)!important}
html[data-theme="light"] body #mainApp .header #profileBtn.has-photo img{border-color:#fff!important}

body #profileSidebar .pu-avatar-wrap{position:relative;flex:none;width:60px;height:60px;border-radius:50%}
body #profileSidebar .pu-avatar{position:relative;width:60px!important;height:60px!important;padding:0;border:0;border-radius:50%!important;overflow:hidden;cursor:pointer;display:grid!important;place-items:center}
body #profileSidebar .pu-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
body #profileSidebar .pu-avatar img[hidden]{display:none}
body #profileSidebar .pu-avatar::after{content:"";position:absolute;inset:0;border-radius:50%;background:rgba(5,10,20,.45);opacity:0;transition:opacity .15s}
body #profileSidebar .pu-avatar:hover::after,body #profileSidebar .pu-avatar:focus-visible::after,body #profileSidebar .pu-avatar-wrap.is-drop .pu-avatar::after{opacity:1}
body #profileSidebar .pu-avatar:focus-visible{outline:2px solid var(--a-accent);outline-offset:3px}
body #profileSidebar .pu-avatar-wrap.is-drop .pu-avatar{outline:2px dashed var(--a-accent);outline-offset:3px}
body #profileSidebar .pu-cam{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--a-accent);color:#fff;border:2px solid var(--a-solid);pointer-events:none;box-shadow:0 4px 10px rgba(0,0,0,.3)}
html[data-theme="light"] body #profileSidebar .pu-cam{border-color:#fff}
body #profileSidebar .pu-cam svg{width:12px;height:12px}
body #profileSidebar .pu-photo-actions{display:flex;gap:12px;margin-top:8px}
body #profileSidebar .pu-photo-actions button{padding:0!important;height:auto!important;border:0!important;background:none!important;font-size:12px!important;font-weight:700!important;color:var(--a-link)!important;cursor:pointer}
body #profileSidebar .pu-photo-actions button:hover{text-decoration:underline}
body #profileSidebar .pu-photo-actions #avatarRemove{color:var(--a-red)!important}
body #profileSidebar .pu-photo-actions [hidden]{display:none!important}
body #profileSidebar .pu-avatar-wrap.is-busy .pu-avatar{opacity:.55;pointer-events:none}
body #profileSidebar .pu-avatar-wrap.is-busy::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid transparent;border-top-color:var(--a-accent);animation:t2aSpin .8s linear infinite}
@keyframes t2aSpin{to{transform:rotate(360deg)}}
body #profileSidebar .pu-photo-actions button:disabled{opacity:.6;cursor:default;text-decoration:none}

/* ==========================================================
   Mobile: centered balance + full-height drawer
   ========================================================== */
@media(max-width:768px){
  /* header = [toggle] [balance, centered] [actions] */
  body #mainApp .header{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px!important}
  body #mainApp .header-left{display:contents!important}
  body #mainApp .header .sidebar-toggle{grid-column:1;justify-self:start}
  body #mainApp .header-metrics{grid-column:2;justify-self:center;justify-content:center}
  body #mainApp .header-right{grid-column:3;justify-self:end;min-width:0;gap:8px!important}
  body #mainApp .header-metric{text-align:center;padding:5px 14px!important}
  body #mainApp .header-metric strong{white-space:nowrap}

  /* drawer covers the full height, sits above the header */
  body #mainApp .sidebar{top:0!important;height:100%;height:100dvh;width:min(288px,84vw)!important;z-index:10002!important;padding:0 14px calc(16px + env(safe-area-inset-bottom))!important;border-right:1px solid var(--a-line2)!important;border-radius:0 20px 20px 0}
  body #mainApp .sidebar-backdrop{inset:0!important;z-index:10001!important}
  body #mainApp .side-brand{display:flex!important;height:62px!important}
  body #mainApp .side-label{margin-top:18px}
  body #mainApp .side-collapse-btn{display:grid;place-items:center;flex:none;margin-left:auto;margin-right:12px;width:36px;height:36px;padding:0;border-radius:10px;border:1px solid var(--a-line2);background:var(--a-surface);color:var(--a-muted);cursor:pointer}
  body #mainApp .side-collapse-btn:active{transform:scale(.92)}
  body #mainApp .side-collapse-btn .st-icon{width:19px;height:19px;overflow:visible}
  body #mainApp .side-collapse-btn .st-fill{opacity:.22}
  body #mainApp .side-collapse-btn .st-chev{transform:none}
  body #mainApp .nav-item{height:48px!important}
  body.t2a-sidebar-lock #askAI{display:none!important}
}
@media(max-width:480px){
  body #mainApp .header{padding:0 8px!important;gap:6px!important;grid-template-columns:auto minmax(0,1fr) auto!important}
  body #mainApp .header-right{gap:6px!important}
  /* MT5 status stays as a compact "MT5 ●" pill */
  body #mainApp .header #masterStatus{width:auto!important;min-width:0!important;padding:0 9px!important;gap:5px!important;justify-content:center}
  body #mainApp .header #masterStatus::before{display:block!important;font-size:11px!important;line-height:1}
  body #mainApp .header #masterStatus::after{width:8px;height:8px;min-width:8px}
  body #mainApp .header-metric{padding:5px 10px!important}
  body #mainApp .header-metric span{font-size:9px!important}
  body #mainApp .header-metric strong{font-size:12.5px!important}
}
@media(max-width:360px){
  /* very small phones: balance takes the free middle space instead of overlapping the buttons */
  body #mainApp .header{grid-template-columns:auto minmax(0,1fr) auto}
  body #mainApp #themeToggle,body #mainApp .header .sidebar-toggle,body #mainApp .header #profileBtn{width:32px!important;min-width:32px!important;height:32px!important}
  body #mainApp .header #masterStatus{height:32px!important;padding:0 7px!important;gap:4px!important}
  body #mainApp .header #masterStatus::before{font-size:10px!important}
  body #mainApp .header-metric{padding:4px 8px!important;max-width:100%}
  body #mainApp .header-metric strong{font-size:11.5px!important;overflow:hidden;text-overflow:ellipsis}
}

/* ===== Dashboard: centered layout (heading + metric cards) ===== */
body #mainApp #dashboard .dash-heading{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:14px!important}
body #mainApp #dashboard .dash-heading>div,body #mainApp #dashboard .dash-heading h1,body #mainApp #dashboard .dash-heading p{text-align:center!important}
body #mainApp #dashboard .dash-heading p{margin-left:auto!important;margin-right:auto!important}
body #mainApp #dashboard .dash-eyebrow{justify-content:center!important}
body #mainApp #dashboard .dash-date{align-self:center!important}
body #mainApp #dashboard .card{text-align:center!important;align-items:center!important;justify-content:center!important}
body #mainApp #dashboard .metric-top{flex-direction:column-reverse!important;justify-content:center!important;align-items:center!important;gap:10px!important;width:100%}
body #mainApp #dashboard .metric-top>span:first-child{text-align:center!important}
body #mainApp #dashboard .card strong,body #mainApp #dashboard .card small{text-align:center!important;width:100%}
body #mainApp #dashboard .metric-line{transform-origin:center!important}
@media (max-width:900px){
  body #mainApp #dashboard .dash-heading{align-items:center!important}
}

/* ===== All pages: centered headings (same as Dashboard) ===== */
/* Open Positions + Payout headers */
body #mainApp .positions-heading,body #mainApp .pay-head{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:14px!important}
body #mainApp .positions-heading>div,body #mainApp .positions-heading h1,body #mainApp .positions-heading p,
body #mainApp .pay-head>div,body #mainApp .pay-head h1,body #mainApp .pay-head p{text-align:center!important}
body #mainApp .positions-heading p,body #mainApp .pay-head p{margin-left:auto!important;margin-right:auto!important}
body #mainApp .pay-head>div{flex:none!important;margin:0 auto!important}
body #mainApp .positions-eyebrow,body #mainApp .pay-head .dash-eyebrow{justify-content:center!important}
body #mainApp .positions-heading>*:not(div:first-child),body #mainApp .pay-head>.pay-btn{align-self:center!important;margin:0 auto!important}

/* Traders (Active Traders) header */
body #mainApp .followers-head{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:12px!important}
body #mainApp .followers-head>div,body #mainApp .followers-head h2,body #mainApp .followers-subtitle{text-align:center!important}
body #mainApp .followers-eyebrow{margin-left:auto!important;margin-right:auto!important}

/* Account Status (MT5 card) */
body #mainApp .mt5-account-top{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:14px!important}
body #mainApp .mt5-account-brand{flex-direction:column!important;align-items:center!important;text-align:center!important;gap:10px!important}
body #mainApp .mt5-account-brand h2,body #mainApp .mt5-account-brand p{text-align:center!important}
body #mainApp .mt5-detail{align-items:center!important;justify-content:center!important;text-align:center!important}
body #mainApp .mt5-detail *{text-align:center!important}
body #mainApp .mt5-detail-icon{align-self:center!important;margin:0 auto 14px!important}

/* Trade History (Daily PnL + Closed Trades) */
body #mainApp .history-top{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:10px!important}
body #mainApp .history-controls{flex-direction:column!important;align-items:center!important;justify-content:center!important}
body #mainApp .history-navigation,body #mainApp .history-stats{justify-content:center!important;flex-wrap:wrap}
body #mainApp .closed-history>.closed-toolbar:first-child{flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:10px!important}
body #mainApp .closed-toolbar{justify-content:center!important}
body #mainApp .closed-toolbar h2{justify-content:center!important}

/* ===== Mobile header: logo + sidebar icon side by side (tap = open menu) ===== */
body #mainApp .header .sidebar-toggle .st-logo{display:none}
@media(max-width:768px){
  body #mainApp .header .sidebar-toggle{display:inline-flex!important;align-items:center;gap:6px;width:auto!important;min-width:0!important;height:46px!important;padding:3px 9px 3px 3px!important;border-radius:999px!important;background:var(--a-surface)!important;border:1px solid var(--a-line2)!important;overflow:visible}
  body #mainApp .header .sidebar-toggle .st-logo{display:block;width:40px;height:40px;min-width:32px;object-fit:contain;border-radius:50%;pointer-events:none}
  body #mainApp .header .sidebar-toggle .st-icon{display:block!important;width:18px;height:18px;flex:none}
  body #mainApp .header .sidebar-toggle:focus-visible{outline-offset:3px}
}
@media(max-width:480px){
  body #mainApp .header .sidebar-toggle{height:46px!important;padding:2px 7px 2px 2px!important;gap:4px}
  body #mainApp .header .sidebar-toggle .st-logo{width:35px;height:350px;min-width:30px}
  body #mainApp .header .sidebar-toggle .st-icon{width:16px;height:16px}
}
@media(max-width:360px){
  body #mainApp .header .sidebar-toggle{height:40px!important;padding:2px 6px 2px 2px!important}
  body #mainApp .header .sidebar-toggle .st-logo{width:26px;height:26px;min-width:26px}
}
#historyAccount[hidden]{display:none!important}
/* Chart watermark (bottom-left) */
#chart .chart-watermark{position:absolute;left:16px;bottom:46px;display:flex;align-items:center;gap:7px;pointer-events:none;user-select:none;opacity:.32;z-index:2}
#chart .chart-watermark img{width:34px;height:34px;border-radius:50%;display:block}
#chart .chart-watermark span{font-weight:800;font-size:12px;letter-spacing:.06em;color:#94a3b8}
html[data-theme="light"] #chart .chart-watermark{opacity:.22}
html[data-theme="light"] #chart .chart-watermark span{color:#0f172a}
#chart .t2a-terminal:fullscreen .chart-watermark{left:22px;bottom:52px}
#chart .t2a-terminal:fullscreen .chart-watermark img{width:42px;height:42px}
#chart .t2a-terminal:fullscreen .chart-watermark span{font-size:14px}
@media (max-width:760px){#chart .chart-watermark{left:8px;bottom:36px}#chart .chart-watermark img{width:24px;height:24px}#chart .chart-watermark span{font-size:10px}}
/* Active timeframe button color */
body #mainApp .terminal-timeframes button.active{background:#e8eef6!important;color:#1e3a5f!important;border-color:#d3dde9!important;box-shadow:0 1px 2px rgba(15,23,42,.06)!important;font-weight:700}
html:not([data-theme="light"]) body #mainApp .terminal-timeframes button.active{background:rgba(148,163,184,.18)!important;color:#f1f5f9!important;border-color:rgba(148,163,184,.28)!important;box-shadow:none!important}
/* Closed trades summary cards: centered */
body #mainApp .closed-summary{justify-content:center!important;margin:18px auto 12px!important;position:relative;clear:both}
body #mainApp .closed-summary>span{align-items:center!important;text-align:center!important}
body #mainApp .closed-note{text-align:center}
/* Header metrics with icons */
body #mainApp .header-metric{display:grid!important;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px!important;row-gap:1px!important;align-items:center!important;text-align:left!important;padding:7px 14px 7px 9px!important}
body #mainApp .header-metric .hm-icon{grid-row:1/3;grid-column:1;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;font-style:normal}
body #mainApp .header-metric .hm-icon svg{width:18px;height:18px}
body #mainApp .header-metric span,body #mainApp .header-metric strong{grid-column:2;text-align:left!important;width:auto!important}
body #mainApp .hm-bal .hm-icon{background:rgba(59,130,246,.12);color:#3b82f6}
body #mainApp .hm-eq .hm-icon{background:rgba(139,92,246,.12);color:#8b5cf6}
body #mainApp .hm-fl .hm-icon{background:rgba(16,185,129,.12);color:#10b981}
html:not([data-theme="light"]) body #mainApp .hm-bal .hm-icon{background:rgba(59,130,246,.18);color:#60a5fa}
html:not([data-theme="light"]) body #mainApp .hm-eq .hm-icon{background:rgba(139,92,246,.18);color:#a78bfa}
html:not([data-theme="light"]) body #mainApp .hm-fl .hm-icon{background:rgba(16,185,129,.18);color:#34d399}
@media(max-width:900px){body #mainApp .header-metric{column-gap:7px!important;padding:5px 9px 5px 6px!important}body #mainApp .header-metric .hm-icon{width:26px;height:26px;border-radius:8px}body #mainApp .header-metric .hm-icon svg{width:14px;height:14px}}
@media(max-width:768px){body #mainApp .header-metric.hm-fl,body #mainApp .header-metric.hm-bal{display:none!important}body #mainApp .header-metric.hm-eq{display:grid!important}}

/* Auto Risk lot preview */
body #mainApp #tradeLot.auto-lot{color:#1d4ed8!important;font-weight:700;cursor:default;opacity:1!important;-webkit-text-fill-color:currentColor}
html:not([data-theme="light"]) body #mainApp #tradeLot.auto-lot{color:#93c5fd!important}
body #mainApp #tradeLot.auto-lot.auto-lot-error{color:#94a3b8!important}

/* Header avatar: name initials when the user has no photo (no logo fallback) */
body #mainApp .header #profileBtn:not(.has-photo){background:var(--a-grad)!important;border:0!important;box-shadow:0 6px 16px rgba(83,120,255,.3)!important}
body #mainApp .header #profileBtn .hdr-initials{display:grid;place-items:center;width:100%;height:100%;color:#fff;font:800 15px Manrope,Inter,sans-serif;letter-spacing:.5px;line-height:1;user-select:none}
body #mainApp .header #profileBtn .hdr-initials[hidden],body #mainApp .header #profileBtn img[hidden]{display:none!important}
@media (max-width:720px){body #mainApp .header #profileBtn .hdr-initials{font-size:12px}}

/* ---- Server demo capacity (admin) ---- */
body #mainApp .server-capacity{display:grid;grid-template-columns:1.6fr auto auto;gap:14px;align-items:center;margin:0 0 16px;padding:14px 16px;border-radius:14px;border:1px solid var(--a-line);background:var(--a-surface2)}
body #mainApp .server-capacity strong{display:block;color:var(--a-text);font:700 14px Inter,sans-serif}
body #mainApp .server-capacity small{display:block;margin-top:3px;color:var(--a-muted);font-size:12px;line-height:1.5}
body #mainApp .server-capacity-stats{display:flex;flex-wrap:wrap;gap:6px}
body #mainApp .server-capacity-stats span{padding:6px 10px;border-radius:100px;border:1px solid var(--a-line);background:var(--a-surface);color:var(--a-muted);font-size:12px;font-weight:700}
body #mainApp .server-capacity-stats span.is-full{color:var(--a-red,#fb7185);border-color:rgba(251,113,133,.35)}
body #mainApp .server-capacity-stats span.is-free{color:var(--a-green,#34d399);border-color:rgba(52,211,153,.35)}
body #mainApp .server-capacity-form{display:flex;gap:8px}
body #mainApp .server-capacity-form input{width:110px;height:42px;padding:0 12px!important;border-radius:11px!important;background:var(--a-surface)!important;border:1px solid var(--a-line2)!important;color:var(--a-text)!important;font:600 13.5px Inter,sans-serif!important}
body #mainApp .server-capacity-form button{height:42px!important;padding:0 16px!important;border-radius:11px!important;border:0!important;background:var(--a-grad)!important;color:#fff!important;font:700 13px Inter,sans-serif!important;cursor:pointer}
@media(max-width:900px){body #mainApp .server-capacity{grid-template-columns:1fr}}
/* ---- Connect modal: agent demo + account change ---- */
body #mt5LoginModal .mt5-capacity-note{margin:10px 0 0!important;padding:12px 14px!important;border-radius:12px!important;border:1px solid rgba(251,113,133,.3)!important;background:rgba(251,113,133,.08)!important;color:var(--a-muted)!important;font-size:12.5px!important;line-height:1.55!important;text-align:left!important}
body #mt5LoginModal .mt5-capacity-note strong{color:var(--a-red,#fb7185)}
body #mt5LoginModal .agent-hint{grid-column:1/-1;margin:0 0 4px!important;padding:11px 13px!important;border-radius:11px!important;border:1px solid var(--a-line)!important;background:var(--a-surface2)!important;color:var(--a-muted)!important;font-size:12.5px!important;line-height:1.55!important;text-align:left!important}
body #mt5LoginModal .agent-panel [hidden]{display:none!important}
body #mt5LoginModal .account-change-panel{margin-top:12px;padding:14px;border-radius:12px;border:1px solid rgba(255,194,77,.3);background:var(--a-amber-bg);text-align:left}
body #mt5LoginModal .account-change-panel[hidden]{display:none}
body #mt5LoginModal .account-change-panel strong{display:block;color:var(--a-amber);font:700 13px Inter,sans-serif}
body #mt5LoginModal .account-change-panel p{margin:6px 0 10px!important;color:var(--a-muted)!important;font-size:12.5px!important;line-height:1.55!important}
body #mt5LoginModal .account-change-panel textarea{width:100%;box-sizing:border-box;min-height:58px;padding:10px 12px;border-radius:11px;border:1px solid var(--a-line2);background:var(--a-surface);color:var(--a-text);font:500 13px Inter,sans-serif;resize:vertical}
body #mt5LoginModal .account-change-panel textarea[hidden]{display:none}
body #mt5LoginModal .account-change-actions{display:flex;gap:8px;margin-top:8px}
body #mt5LoginModal .account-change-actions button{flex:1;height:40px!important;margin:0!important;border-radius:11px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important;font:700 12.5px Inter,sans-serif!important;cursor:pointer}
body #mt5LoginModal .account-change-actions button[hidden]{display:none}
/* ---- Connect modal: scroll when content is taller than the screen ---- */
body #mt5LoginModal{align-items:center;padding:16px 0;box-sizing:border-box}
body #mt5LoginModal .mt5-login-box{max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--a-line2) transparent;box-sizing:border-box}
body #mt5LoginModal .mt5-login-box::-webkit-scrollbar{width:8px}
body #mt5LoginModal .mt5-login-box::-webkit-scrollbar-track{background:transparent;margin:18px 0}
body #mt5LoginModal .mt5-login-box::-webkit-scrollbar-thumb{background:var(--a-line2);border-radius:8px}
body #mt5LoginModal .mt5-login-box{padding-top:0!important;scroll-padding-top:80px}
body #mt5LoginModal .mt5-login-header{position:sticky;top:0;z-index:5;margin:0 -26px 16px!important;padding:22px 26px 14px!important;background:var(--a-solid)!important;border-bottom:1px solid var(--a-line)!important}
html[data-theme="light"] body #mt5LoginModal .mt5-login-header{background:#fff!important}

/* ---- Copy Trader (follower-to-follower copy) */
body #followerCopyModal .fs-box{width:min(520px,calc(100vw - 32px))!important;max-height:calc(100vh - 40px)!important;display:flex;flex-direction:column;border-radius:22px!important;border:1px solid var(--a-line2)!important;background:var(--a-solid)!important;color:var(--a-text)!important;box-shadow:0 30px 80px rgba(0,0,0,.5)!important;overflow:hidden}
html[data-theme="light"] body #followerCopyModal .fs-box{background:#fff!important;box-shadow:0 24px 60px rgba(20,40,80,.18)!important}
body #followerCopyModal .fs-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px 24px!important;border-bottom:1px solid var(--a-line)!important}
body #followerCopyModal .fs-header h2{margin:0 0 3px!important;font:800 20px Manrope,Inter,sans-serif!important;color:var(--a-text)!important}
body #followerCopyModal .fs-header p{margin:0!important;color:var(--a-muted)!important;font-size:13px!important}
body #followerCopyModal #fcClose{border:0;background:transparent;color:var(--a-muted);font-size:18px;cursor:pointer}
body #followerCopyModal .fs-body{padding:8px 24px 18px!important;overflow-y:auto}
body #followerCopyModal .fs-section{margin:20px 0 10px!important;color:var(--a-dim)!important;font-size:11px!important;font-weight:800!important;letter-spacing:1.3px!important}
body #followerCopyModal .fs-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px!important;margin-top:14px;border-radius:14px!important;border:1px solid var(--a-line)!important;background:var(--a-surface)!important}
body #followerCopyModal .fs-row strong{display:block;color:var(--a-text)!important;font-size:14px!important;font-weight:700!important}
body #followerCopyModal .fs-row small{display:block;margin-top:2px;color:var(--a-muted)!important;font-size:12px!important}
body #followerCopyModal .fs-row input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:none;width:44px!important;height:26px!important;margin:0;border-radius:100px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface2)!important;position:relative;cursor:pointer;transition:background .2s}
body #followerCopyModal .fs-row input[type=checkbox]::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);transition:transform .2s}
body #followerCopyModal .fs-row input[type=checkbox]:checked{background:var(--a-grad)!important;border-color:transparent!important}
body #followerCopyModal .fs-row input[type=checkbox]:checked::after{transform:translateX(18px)}
body #followerCopyModal .fs-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
body #followerCopyModal .fs-grid label{display:flex;flex-direction:column;gap:6px;color:var(--a-text)!important;font-size:12.5px!important;font-weight:600!important}
body #followerCopyModal .fs-grid input{width:100%;height:46px!important;padding:0 14px!important;border-radius:12px!important;border:1px solid var(--a-line2)!important;background:var(--a-surface2)!important;color:var(--a-text)!important;font:500 14px Inter,sans-serif!important;box-sizing:border-box}
body #followerCopyModal .fs-grid input:focus{border-color:var(--a-accent)!important;outline:none;box-shadow:0 0 0 4px rgba(83,164,255,.15)!important}
body #followerCopyModal .fs-note{margin-top:12px!important;padding:12px 14px!important;border-radius:12px!important;border:1px solid rgba(83,164,255,.25)!important;background:var(--a-blue-bg)!important;color:var(--a-muted)!important;font-size:12.5px!important;line-height:1.5}
body #followerCopyModal #fcMessage{margin-top:10px;font-size:12.5px;color:var(--a-red)}
body #followerCopyModal .fs-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px!important;border-top:1px solid var(--a-line)!important}
body #followerCopyModal .fs-footer button{height:44px!important;padding:0 20px!important;border-radius:12px!important;font:700 14px Inter,sans-serif!important;cursor:pointer;border:1px solid var(--a-line2)!important;background:var(--a-surface)!important;color:var(--a-text)!important}
body #followerCopyModal #fcSave{border:0!important;background:var(--a-grad)!important;color:#fff!important}
body #followerCopyModal #fcStop{margin-right:auto;color:var(--a-red)!important;border-color:rgba(255,92,114,.35)!important;background:var(--a-red-bg)!important}
body #followerCopyModal button:disabled{opacity:.5;cursor:not-allowed}
body #mainApp .growth-control.is-copying{color:var(--a-green)!important;border-color:rgba(47,224,138,.35)!important;background:var(--a-green-bg)!important}
body #mainApp .growth-control.is-copy{color:#fff!important;border:0!important;background:var(--a-grad)!important}
body #mainApp .growth-copy-you{color:var(--a-dim);font-size:12px;font-weight:700}
@media (max-width:560px){body #followerCopyModal .fs-grid{grid-template-columns:1fr!important}}
