/* VELAEA Your Portfolio library — canonical compact accordion list. */
body.portfolio-page.portfolio-library-mode #backtest-history{display:none!important}
body.portfolio-page.portfolio-library-mode.portfolio-detail-collapsed #portfolio-selected-snapshot,
body.portfolio-page.portfolio-library-mode.portfolio-detail-collapsed #mt5-performance{display:none!important}
body.portfolio-page.portfolio-library-mode.portfolio-detail-collapsed #mt5LiveBadge{display:none}
body.portfolio-page #mt5-realtime .mt5-portfolio-switcher{margin-top:12px}

body.portfolio-page #mt5-realtime>.panel-pad{padding:12px!important}
body.portfolio-page #mt5-realtime .panel-head{margin-bottom:8px!important}
body.portfolio-page #mt5-realtime .mt5-portfolio-switcher-head{padding:8px 10px!important;gap:10px!important}
body.portfolio-page #mt5-realtime .mt5-portfolio-switcher-head strong{font-size:12px!important}
body.portfolio-page #mt5-realtime .mt5-portfolio-switcher-head span{font-size:9px!important;line-height:1.35!important}
body.portfolio-page #mt5-realtime .your-portfolio-manager-note{margin-top:8px!important;padding:8px 10px!important}
body.portfolio-page #mt5-realtime .your-portfolio-manager-note strong{font-size:10px!important}
body.portfolio-page #mt5-realtime .your-portfolio-manager-note span{font-size:9px!important;line-height:1.35!important}

body.portfolio-page #mt5-realtime .mt5-portfolio-list{display:grid;gap:8px}
body.portfolio-page #mt5-realtime .mt5-port-card{
  overflow:hidden;border:1px solid rgba(202,160,68,.22);border-radius:15px;background:rgba(255,255,255,.66);
  box-shadow:0 7px 18px rgba(15,31,52,.045);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease
}
body.portfolio-page #mt5-realtime .mt5-port-card:hover{border-color:rgba(210,164,55,.46);box-shadow:0 10px 24px rgba(15,31,52,.075)}
body.portfolio-page #mt5-realtime .mt5-port-card.active{border-color:rgba(210,164,55,.70);box-shadow:0 0 0 2px rgba(210,164,55,.10),0 10px 24px rgba(15,31,52,.075)}
body.portfolio-page #mt5-realtime .mt5-port-summary-row{min-width:0}
body.portfolio-page #mt5-realtime .mt5-port-summary-button{
  appearance:none;width:100%;min-height:58px;padding:8px 12px;border:0;background:transparent;color:inherit;cursor:pointer;
  display:grid;grid-template-columns:minmax(190px,1.55fr) auto minmax(265px,1.5fr) auto 28px;align-items:center;gap:10px;text-align:left
}
body.portfolio-page #mt5-realtime .mt5-port-summary-button:focus-visible{outline:3px solid rgba(210,164,55,.20);outline-offset:-3px}
body.portfolio-page #mt5-realtime .mt5-port-title{min-width:0}
body.portfolio-page #mt5-realtime .mt5-port-title strong{display:block;overflow:hidden;font-size:14px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-title span{display:block;overflow:hidden;margin-top:3px;color:var(--muted);font-size:10px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-status{justify-self:start;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-summary-metrics{display:grid;grid-template-columns:repeat(3,minmax(70px,1fr));gap:6px;min-width:0}
body.portfolio-page #mt5-realtime .mt5-port-summary-metrics>span{min-width:0;padding:6px 8px;border:1px solid rgba(110,128,151,.15);border-radius:10px;background:rgba(255,255,255,.48)}
body.portfolio-page #mt5-realtime .mt5-port-summary-metrics small{display:block;overflow:hidden;color:var(--muted);font-size:8px;font-weight:900;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-summary-metrics b{display:block;overflow:hidden;margin-top:2px;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-chevron{
  display:grid;width:23px;height:23px;place-items:center;border:1px solid rgba(202,151,42,.38);
  border-radius:7px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(248,237,208,.76));
  color:#9b6810;box-shadow:0 4px 10px rgba(126,84,12,.08);
  transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease
}
body.portfolio-page #mt5-realtime .mt5-port-chevron-mark{
  position:relative;display:block;width:10px;height:7px
}
body.portfolio-page #mt5-realtime .mt5-port-chevron-mark::before,
body.portfolio-page #mt5-realtime .mt5-port-chevron-mark::after{
  content:"";position:absolute;top:2px;width:7px;height:2px;border-radius:999px;background:currentColor;
  transition:transform .18s ease
}
body.portfolio-page #mt5-realtime .mt5-port-chevron-mark::before{left:0;transform:rotate(42deg);transform-origin:left center}
body.portfolio-page #mt5-realtime .mt5-port-chevron-mark::after{right:0;transform:rotate(-42deg);transform-origin:right center}
body.portfolio-page #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron{
  background:linear-gradient(180deg,#f2c760,#daa226);border-color:#c28a17;
  color:#16253a;box-shadow:0 5px 12px rgba(171,116,17,.18)
}
body.portfolio-page #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron-mark::before{transform:rotate(-42deg)}
body.portfolio-page #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron-mark::after{transform:rotate(42deg)}
body.portfolio-page #mt5-realtime .mt5-port-details{padding:0 12px 12px;border-top:1px solid rgba(202,160,68,.16);animation:portfolioAccordionIn .16s ease-out}
body.portfolio-page #mt5-realtime .mt5-port-details[hidden]{display:none!important}
@keyframes portfolioAccordionIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
body.portfolio-page #mt5-realtime .mt5-port-mini{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:10px}
body.portfolio-page #mt5-realtime .mt5-port-mini>div{min-width:0;padding:8px 9px;border:1px solid rgba(110,128,151,.16);border-radius:11px;background:rgba(255,255,255,.45)}
body.portfolio-page #mt5-realtime .mt5-port-mini label{display:block;overflow:hidden;color:var(--muted);font-size:8px;font-weight:900;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-mini b{display:block;overflow:hidden;margin-top:3px;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-port-service{display:flex!important;align-items:center;flex-wrap:wrap;gap:6px;margin-top:9px}
body.portfolio-page #mt5-realtime .mt5-visibility-actions{display:flex!important;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;padding-top:9px;border-top:1px solid rgba(199,157,66,.16)}
body.portfolio-page #mt5-realtime .mt5-visibility-actions>span{color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.04em;white-space:nowrap}
body.portfolio-page #mt5-realtime .mt5-public-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
body.portfolio-page #mt5-realtime .mt5-title-edit,
body.portfolio-page #mt5-realtime .mt5-visibility-toggle,
body.portfolio-page #mt5-realtime .mt5-delete-history-btn{min-height:30px;padding:6px 10px;border-radius:9px;font-size:9px;font-weight:950;line-height:1}
body.portfolio-page #mt5-realtime .mt5-visibility-toggle{border:1px solid rgba(72,176,109,.28);background:rgba(72,176,109,.09);color:#238654}
body.portfolio-page #mt5-realtime .mt5-visibility-toggle.is-public{border-color:rgba(200,149,46,.30);background:rgba(200,149,46,.10);color:#9a6810}
body.portfolio-page #mt5-realtime .mt5-delete-history-btn{border-color:rgba(220,72,72,.28);background:rgba(220,72,72,.07);color:#bc3030}
body.portfolio-page #mt5-realtime .mt5-delete-history-btn:hover{border-color:rgba(220,72,72,.48);background:rgba(220,72,72,.12)}
body.portfolio-page #mt5-realtime .mt5-port-reason{display:block;margin-top:8px}
body.portfolio-page #mt5-realtime .mt5-port-open-detail{width:100%;min-height:34px;margin-top:9px;border:0;border-radius:10px;background:linear-gradient(135deg,#f8d06d,#e9ad31);color:#172538;cursor:pointer;font-size:10px;font-weight:950}
body.portfolio-page #mt5-realtime .mt5-port-open-detail:hover{filter:brightness(1.03);box-shadow:0 8px 18px rgba(218,166,52,.18)}
body.portfolio-page #mt5-realtime .dashboard-switcher-stamp{display:none}
.portfolio-detail-close{appearance:none;padding:9px 14px;border:1px solid rgba(220,166,44,.42);border-radius:999px;background:rgba(255,255,255,.72);color:#172538;cursor:pointer;font:900 12px/1 inherit}
.portfolio-detail-close:hover,.portfolio-detail-close:focus-visible{border-color:#dca62c;box-shadow:0 0 0 3px rgba(220,166,44,.13);outline:none}
@media(max-width:1080px){
  body.portfolio-page #mt5-realtime .mt5-port-summary-button{grid-template-columns:minmax(180px,1.45fr) auto minmax(210px,1.2fr) auto 28px}
  body.portfolio-page #mt5-realtime .mt5-port-summary-metrics>span:nth-child(2){display:none}
  body.portfolio-page #mt5-realtime .mt5-port-summary-metrics{grid-template-columns:repeat(2,minmax(70px,1fr))}
}
@media(max-width:820px){
  body.portfolio-page #mt5-realtime .mt5-port-summary-button{grid-template-columns:minmax(0,1fr) auto auto 28px;min-height:56px}
  body.portfolio-page #mt5-realtime .mt5-port-summary-metrics{display:none}
  body.portfolio-page #mt5-realtime .mt5-port-mini{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  body.portfolio-page #mt5-realtime .mt5-port-summary-button{grid-template-columns:minmax(0,1fr) auto 28px;gap:7px;padding:8px 9px}
  body.portfolio-page #mt5-realtime .mt5-port-summary-button>.mt5-visibility-pill{display:none}
  body.portfolio-page #mt5-realtime .mt5-port-title strong{font-size:13px}
  body.portfolio-page #mt5-realtime .mt5-port-title span{font-size:9px}
  body.portfolio-page #mt5-realtime .mt5-port-details{padding:0 9px 9px}
  body.portfolio-page #mt5-realtime .mt5-visibility-actions{align-items:flex-start;flex-direction:column}
  body.portfolio-page #mt5-realtime .mt5-public-actions{display:grid!important;width:100%;grid-template-columns:1fr 1fr}
  body.portfolio-page #mt5-realtime .mt5-title-edit,body.portfolio-page #mt5-realtime .mt5-visibility-toggle,body.portfolio-page #mt5-realtime .mt5-delete-history-btn{width:100%}
  body.portfolio-page #mt5-realtime .mt5-delete-history-btn{grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce){body.portfolio-page #mt5-realtime *{animation:none!important;transition:none!important}}

/* V5 overflow and accordion affordance fix.
   Force one canonical full-width list column so compact rows never inherit
   the legacy two-column card grid from inline page CSS. */
body.portfolio-page #mt5-realtime .mt5-portfolio-list{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  grid-template-columns:minmax(0,1fr)!important;
  padding:10px!important;
  overflow:hidden!important;
}
body.portfolio-page #mt5-realtime .mt5-port-card,
body.portfolio-page #mt5-realtime .mt5-port-summary-row,
body.portfolio-page #mt5-realtime .mt5-port-summary-button,
body.portfolio-page #mt5-realtime .mt5-port-details{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.portfolio-page #mt5-realtime .mt5-port-summary-button{
  grid-template-columns:minmax(180px,1.45fr) auto minmax(225px,1.25fr) auto 34px!important;
  overflow:hidden!important;
}
body.portfolio-page #mt5-realtime .mt5-port-summary-button > *{min-width:0!important}
body.portfolio-page #mt5-realtime .mt5-port-summary-metrics{
  min-width:0!important;
  overflow:hidden!important;
}
body.portfolio-page #mt5-realtime .mt5-port-chevron{
  position:relative!important;
  width:30px!important;
  height:30px!important;
  flex:0 0 30px!important;
  border:1px solid rgba(210,164,55,.34)!important;
  background:linear-gradient(180deg,rgba(255,250,235,.98),rgba(248,237,207,.92))!important;
  color:#9a6810!important;
  box-shadow:0 5px 12px rgba(190,144,43,.12),inset 0 1px 0 rgba(255,255,255,.82)!important;
  font-size:0!important;
  font-weight:950!important;
  transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease!important;
}

body.portfolio-page #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron{
  transform:none!important;
  border-color:rgba(210,164,55,.62)!important;
  background:linear-gradient(180deg,#f8d77c,#e9ad31)!important;
  color:#172538!important;
  box-shadow:0 7px 15px rgba(218,166,52,.20),inset 0 1px 0 rgba(255,255,255,.54)!important;
}

body.portfolio-page #mt5-realtime .mt5-port-summary-button:hover .mt5-port-chevron,
body.portfolio-page #mt5-realtime .mt5-port-summary-button:focus-visible .mt5-port-chevron{
  border-color:rgba(210,164,55,.64)!important;
  box-shadow:0 7px 16px rgba(190,144,43,.18),0 0 0 3px rgba(210,164,55,.10)!important;
}

@media(max-width:1180px){
  body.portfolio-page #mt5-realtime .mt5-port-summary-button{
    grid-template-columns:minmax(165px,1.35fr) auto minmax(180px,1fr) auto 34px!important;
  }
}
@media(max-width:900px){
  body.portfolio-page #mt5-realtime .mt5-port-summary-button{
    grid-template-columns:minmax(0,1fr) auto auto 34px!important;
  }
  body.portfolio-page #mt5-realtime .mt5-port-summary-metrics{display:none!important}
}
@media(max-width:620px){
  body.portfolio-page #mt5-realtime .mt5-portfolio-list{padding:7px!important}
  body.portfolio-page #mt5-realtime .mt5-port-summary-button{
    grid-template-columns:minmax(0,1fr) auto 32px!important;
    min-height:54px!important;
    gap:6px!important;
    padding:7px 8px!important;
  }
  body.portfolio-page #mt5-realtime .mt5-port-summary-button>.mt5-visibility-pill{display:none!important}
  body.portfolio-page #mt5-realtime .mt5-port-chevron{width:28px!important;height:28px!important;flex-basis:28px!important}
}


/* V6 single-open accordion and selected-stat navigation feedback. */
body.portfolio-page #mt5-realtime .mt5-port-open-detail{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}
body.portfolio-page #mt5-realtime .mt5-port-open-detail span{
  display:inline-grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:999px;
  background:rgba(255,255,255,.35);
  font-size:14px;
  transition:transform .18s ease;
}
body.portfolio-page #mt5-realtime .mt5-port-open-detail:hover span,
body.portfolio-page #mt5-realtime .mt5-port-open-detail:focus-visible span{transform:translateY(2px)}
body.portfolio-page #portfolio-selected-snapshot{scroll-margin-top:96px}
body.portfolio-page #portfolio-selected-snapshot.is-scroll-highlight{
  animation:portfolioSelectedPulse 1.45s ease-out;
}
@keyframes portfolioSelectedPulse{
  0%{box-shadow:0 0 0 0 rgba(218,166,52,.30),0 16px 44px rgba(31,49,77,.08)}
  45%{box-shadow:0 0 0 7px rgba(218,166,52,.13),0 18px 48px rgba(31,49,77,.10)}
  100%{box-shadow:0 0 0 0 rgba(218,166,52,0),0 16px 44px rgba(31,49,77,.08)}
}
@media(max-width:620px){
  body.portfolio-page #portfolio-selected-snapshot{scroll-margin-top:78px}
  body.portfolio-page #mt5-realtime .mt5-port-open-detail{min-height:38px!important;font-size:11px!important}
}
@media(prefers-reduced-motion:reduce){
  body.portfolio-page #portfolio-selected-snapshot.is-scroll-highlight{animation:none!important}
  body.portfolio-page #mt5-realtime .mt5-port-open-detail span{transition:none!important}
}

/* V7 dark-theme parity for the compact Portfolio accordion.
   Keeps the canonical list readable instead of inheriting light card fills. */
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-portfolio-list,
body.dark-mode.portfolio-page #mt5-realtime .mt5-portfolio-list,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-portfolio-list{
  background:rgba(7,16,29,.46)!important;
  border-color:rgba(242,199,106,.14)!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-card,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-card,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-card{
  background:linear-gradient(180deg,rgba(16,28,46,.96),rgba(10,20,34,.98))!important;
  border-color:rgba(242,199,106,.18)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.03)!important;
  color:#eef5ff!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-card:hover,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-card:hover,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-card:hover{
  border-color:rgba(242,199,106,.42)!important;
  box-shadow:0 14px 30px rgba(0,0,0,.34),0 0 0 1px rgba(242,199,106,.05) inset!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-card.active,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-card.active,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-card.active{
  border-color:rgba(242,199,106,.70)!important;
  box-shadow:0 0 0 2px rgba(242,199,106,.10),0 14px 30px rgba(0,0,0,.34)!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-summary-button,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-summary-button,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-summary-button{
  color:#eef5ff!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-title strong,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-title strong,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-title strong{
  color:#f7fbff!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-title span,
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-summary-metrics small,
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-mini label,
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-visibility-actions>span,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-title span,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-summary-metrics small,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-mini label,
body.dark-mode.portfolio-page #mt5-realtime .mt5-visibility-actions>span,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-title span,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-summary-metrics small,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-mini label,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-visibility-actions>span{
  color:#9fb1c8!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-summary-metrics>span,
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-mini>div,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-summary-metrics>span,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-mini>div,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-summary-metrics>span,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-mini>div{
  background:rgba(255,255,255,.045)!important;
  border-color:rgba(159,177,200,.13)!important;
  color:#f1f6fc!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-summary-metrics b,
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-mini b,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-summary-metrics b,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-mini b,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-summary-metrics b,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-mini b{
  color:#f7fbff!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-details,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-details,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-details{
  border-top-color:rgba(242,199,106,.13)!important;
  background:linear-gradient(180deg,rgba(8,18,31,.34),rgba(8,18,31,.12))!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-visibility-actions,
body.dark-mode.portfolio-page #mt5-realtime .mt5-visibility-actions,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-visibility-actions{
  border-top-color:rgba(242,199,106,.12)!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-chevron,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-chevron,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-chevron{
  border-color:rgba(242,199,106,.30)!important;
  background:linear-gradient(180deg,rgba(65,51,21,.98),rgba(39,31,16,.98))!important;
  color:#f3cf72!important;
  box-shadow:0 7px 16px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-card.is-expanded .mt5-port-chevron{
  border-color:rgba(242,199,106,.62)!important;
  background:linear-gradient(180deg,#f3d477,#c9942d)!important;
  color:#091423!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-title-edit,
body.dark-mode.portfolio-page #mt5-realtime .mt5-title-edit,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-title-edit{
  background:rgba(255,255,255,.045)!important;
  border-color:rgba(159,177,200,.18)!important;
  color:#dbe7f4!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-visibility-toggle,
body.dark-mode.portfolio-page #mt5-realtime .mt5-visibility-toggle,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-visibility-toggle{
  background:rgba(72,176,109,.12)!important;
  border-color:rgba(72,176,109,.28)!important;
  color:#8fe0ad!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-visibility-toggle.is-public,
body.dark-mode.portfolio-page #mt5-realtime .mt5-visibility-toggle.is-public,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-visibility-toggle.is-public{
  background:rgba(200,149,46,.12)!important;
  border-color:rgba(200,149,46,.30)!important;
  color:#f2cf7b!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-delete-history-btn,
body.dark-mode.portfolio-page #mt5-realtime .mt5-delete-history-btn,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-delete-history-btn{
  background:rgba(220,72,72,.10)!important;
  border-color:rgba(220,72,72,.30)!important;
  color:#ff9c9c!important;
}
html[data-theme="dark"] body.portfolio-page #mt5-realtime .mt5-port-open-detail,
body.dark-mode.portfolio-page #mt5-realtime .mt5-port-open-detail,
body.portfolio-page:not(.light-mode) #mt5-realtime .mt5-port-open-detail{
  background:linear-gradient(135deg,#f4d477,#c9942d)!important;
  color:#091423!important;
  box-shadow:0 9px 20px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] body.portfolio-page .portfolio-detail-close,
body.dark-mode.portfolio-page .portfolio-detail-close,
body.portfolio-page:not(.light-mode) .portfolio-detail-close{
  background:rgba(16,28,46,.92)!important;
  border-color:rgba(242,199,106,.30)!important;
  color:#f4d47c!important;
}
html[data-theme="dark"] body.portfolio-page #portfolio-selected-snapshot.is-scroll-highlight,
body.dark-mode.portfolio-page #portfolio-selected-snapshot.is-scroll-highlight,
body.portfolio-page:not(.light-mode) #portfolio-selected-snapshot.is-scroll-highlight{
  animation:portfolioSelectedPulseDark 1.45s ease-out;
}
@keyframes portfolioSelectedPulseDark{
  0%{box-shadow:0 0 0 0 rgba(242,199,106,.34),0 18px 48px rgba(0,0,0,.30)}
  45%{box-shadow:0 0 0 7px rgba(242,199,106,.13),0 20px 52px rgba(0,0,0,.34)}
  100%{box-shadow:0 0 0 0 rgba(242,199,106,0),0 18px 48px rgba(0,0,0,.30)}
}

/* Canonical accordion affordance: chevron points down when closed and up when open. */
body.portfolio-page #mt5-realtime .mt5-port-summary-button:hover .mt5-port-chevron,
body.portfolio-page #mt5-realtime .mt5-port-summary-button:focus-visible .mt5-port-chevron{
  border-color:rgba(194,138,23,.72);box-shadow:0 0 0 2px rgba(220,166,44,.11),0 3px 8px rgba(126,84,12,.08)
}
@media(max-width:560px){
  body.portfolio-page #mt5-realtime .mt5-port-chevron{width:22px;height:22px;border-radius:7px}
}

/* Accordion icon hard reset: use only the CSS chevron; never show + / − glyphs. */
body.portfolio-page #mt5-realtime .mt5-port-chevron::before,
body.portfolio-page #mt5-realtime .mt5-port-chevron::after{
  content:none !important;
  display:none !important;
}
body.portfolio-page #mt5-realtime .mt5-port-chevron{
  font-size:0 !important;
  line-height:0 !important;
}
body.portfolio-page #mt5-realtime .mt5-port-chevron-mark{
  display:block !important;
}
.dashboard-bt-test-setup{grid-column:1/-1;margin-top:4px;border:1px solid rgba(226,178,65,.25);border-radius:14px;background:linear-gradient(145deg,rgba(226,178,65,.07),rgba(255,255,255,.018));overflow:hidden}
.dashboard-bt-test-setup>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px}.dashboard-bt-test-setup>summary::-webkit-details-marker{display:none}.dashboard-bt-test-setup>summary span{display:grid;gap:2px}.dashboard-bt-test-setup>summary b{font-size:11px}.dashboard-bt-test-setup>summary small{font-size:9px;color:var(--muted)}.dashboard-bt-test-setup>summary em{font-style:normal;font-size:9px;font-weight:900;color:#e9ba4c}
.dashboard-bt-test-input-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:7px;padding:0 10px 10px}.dashboard-bt-test-input{min-width:0;padding:9px 10px;border:1px solid rgba(148,163,184,.14);border-radius:10px;background:rgba(5,15,28,.4);display:grid;gap:2px}.dashboard-bt-test-input span,.dashboard-bt-test-input small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:8px}.dashboard-bt-test-input strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.dashboard-bt-magic-number{margin:0 10px 8px;padding:9px 11px;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid rgba(242,199,106,.36);border-radius:10px;background:rgba(242,199,106,.08)}.dashboard-bt-magic-number span{color:#d9b759;font-size:8px;font-weight:950;letter-spacing:.07em;text-transform:uppercase}.dashboard-bt-magic-number strong{color:#f7fbff;font-size:13px}.dashboard-bt-test-input.is-magic-number{border-color:rgba(242,199,106,.42);box-shadow:inset 3px 0 #e9ba4c}html[data-theme="light"] .dashboard-bt-magic-number{background:#fff8e7}html[data-theme="light"] .dashboard-bt-magic-number strong{color:#17263a}
html[data-theme="light"] .dashboard-bt-test-setup{background:linear-gradient(145deg,rgba(214,165,45,.10),rgba(255,255,255,.82))}html[data-theme="light"] .dashboard-bt-test-input{background:rgba(255,255,255,.86)}


/* VELAEA_BACKTEST_NEXT_ACTIONS_V1_START */
body.portfolio-page #mt5-realtime .mt5-backtest-next-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  width:100%;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(209,164,64,.18);
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action{
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 22px;
  align-items:center;
  gap:11px;
  width:100%;
  min-width:0;
  min-height:76px;
  padding:13px 14px;
  overflow:hidden;
  border:1px solid rgba(232,183,70,.42);
  border-radius:15px;
  color:#f7f1df;
  text-align:left;
  cursor:default;
  box-sizing:border-box;
  box-shadow:0 10px 26px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.06);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,filter .22s ease;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action::before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:-2;
  background:linear-gradient(120deg,transparent 0 22%,rgba(255,255,255,.12) 40%,transparent 58% 100%);
  transform:translateX(-130%);
  animation:velaeaBacktestActionSheen 5.4s ease-in-out infinite;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-3;
  border-radius:inherit;
  opacity:.95;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-market{
  background:linear-gradient(135deg,rgba(111,73,14,.94),rgba(38,31,22,.98));
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-market::after{
  background:radial-gradient(circle at 14% 20%,rgba(244,193,72,.24),transparent 40%);
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward{
  border-color:rgba(56,201,145,.42);
  background:linear-gradient(135deg,rgba(16,91,67,.92),rgba(17,39,41,.98));
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward::after{
  background:radial-gradient(circle at 14% 20%,rgba(70,226,164,.22),transparent 42%);
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-icon{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:13px;
  background:rgba(4,16,28,.38);
  color:#f5c85e;
  font-size:20px;
  font-weight:1000;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward .mt5-backtest-next-action-icon{color:#56e1a7}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-copy{display:block;min-width:0}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-copy strong{
  display:block;
  overflow-wrap:anywhere;
  color:inherit;
  font-size:12px;
  font-weight:950;
  line-height:1.35;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-copy small{
  display:block;
  margin-top:4px;
  overflow-wrap:anywhere;
  color:rgba(218,227,238,.70);
  font-size:9px;
  font-weight:750;
  line-height:1.35;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-arrow{
  color:rgba(255,255,255,.68);
  font-size:18px;
  font-weight:950;
  transition:transform .22s ease,color .22s ease;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action:hover,
body.portfolio-page #mt5-realtime .mt5-backtest-next-action:focus-visible{
  transform:translateY(-2px);
  filter:brightness(1.05);
  border-color:rgba(245,198,88,.72);
  box-shadow:0 14px 34px rgba(0,0,0,.23),0 0 0 3px rgba(226,173,57,.08);
  outline:none;
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward:hover,
body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward:focus-visible{
  border-color:rgba(69,220,158,.72);
  box-shadow:0 14px 34px rgba(0,0,0,.23),0 0 0 3px rgba(62,211,150,.08);
}
body.portfolio-page #mt5-realtime .mt5-backtest-next-action:hover .mt5-backtest-next-action-arrow,
body.portfolio-page #mt5-realtime .mt5-backtest-next-action:focus-visible .mt5-backtest-next-action-arrow{
  transform:translateX(3px);
  color:#fff;
}
@keyframes velaeaBacktestActionSheen{
  0%,60%{transform:translateX(-135%)}
  78%,100%{transform:translateX(135%)}
}
@media(max-width:760px){
  body.portfolio-page #mt5-realtime .mt5-backtest-next-actions{grid-template-columns:1fr}
}
@media(max-width:480px){
  body.portfolio-page #mt5-realtime .mt5-backtest-next-action{
    grid-template-columns:38px minmax(0,1fr) 18px;
    min-height:68px;
    padding:11px 12px;
    gap:9px;
    border-radius:13px;
  }
  body.portfolio-page #mt5-realtime .mt5-backtest-next-action-icon{width:38px;height:38px;border-radius:11px;font-size:18px}
  body.portfolio-page #mt5-realtime .mt5-backtest-next-action-copy strong{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
  body.portfolio-page #mt5-realtime .mt5-backtest-next-action::before{animation:none!important}
}
/* VELAEA_BACKTEST_NEXT_ACTIONS_V1_END */

/* Light theme — next-step cards use a clean brand surface instead of dark fills. */
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action{
  color:#26354a;
  border-color:rgba(178,126,17,.30);
  box-shadow:0 10px 24px rgba(92,67,17,.09),inset 0 1px 0 #fff;
}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-market,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-market{
  background:linear-gradient(135deg,#fffaf0 0%,#f6ead0 100%);
}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-market::after,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-market::after{
  background:radial-gradient(circle at 12% 18%,rgba(226,169,44,.16),transparent 44%);
}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-forward,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward{
  color:#204638;
  border-color:rgba(30,151,101,.30);
  background:linear-gradient(135deg,#f2fbf7 0%,#e2f4ec 100%);
}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-icon,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-icon{
  border-color:rgba(177,125,15,.22);
  background:#fff3d2;
  color:#9a6700;
  box-shadow:0 5px 14px rgba(142,99,11,.10),inset 0 1px 0 #fff;
}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-forward .mt5-backtest-next-action-icon,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward .mt5-backtest-next-action-icon{
  border-color:rgba(25,143,94,.20);background:#dcf4e9;color:#16734d;
}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-copy small,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-copy small{color:#69778a}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-arrow,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-arrow{color:#956400}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action-forward .mt5-backtest-next-action-arrow,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action-forward .mt5-backtest-next-action-arrow{color:#16734d}
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action:hover,
body.portfolio-page.light-mode #mt5-realtime .mt5-backtest-next-action:focus-visible,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action:hover,
html[data-theme="light"] body.portfolio-page #mt5-realtime .mt5-backtest-next-action:focus-visible{
  border-color:rgba(182,127,13,.55);
  box-shadow:0 14px 30px rgba(92,67,17,.13),0 0 0 3px rgba(226,173,57,.08);
}
