.tp-layer{position:absolute;inset:0;pointer-events:none;z-index:5;overflow:hidden;font:12px IQRoboto,Roboto,sans-serif;color:var(--iq-text-primary,#fff)}.tp-tickets{position:absolute;display:flex;gap:8px;flex-wrap:wrap;max-width:65%}.tp-ticket{height:32px;padding:0 10px;display:flex;align-items:center;gap:10px;border-radius:16px;background:var(--iq-surface-2,#262c3c);box-shadow:0 1px 5px #0004;font-size:11px;border-left:3px solid var(--iq-up,#009a2d)}.tp-ticket.down{border-color:var(--iq-down,#c14331)}.tp-ticket strong{font-size:13px}.tp-strike{position:absolute;height:0;border-top:1px dashed var(--iq-up,#009a2d);opacity:.9}.tp-strike.down{border-color:var(--iq-down,#c14331)}.tp-entry{position:absolute;top:-12px;background:var(--iq-surface-4,#3b404f);padding:4px 8px;border-radius:10px;font-size:10px}.tp-expiry{position:absolute;border-left:1px dashed #ffffff9c}.tp-expiry>span{position:absolute;top:4px;left:5px;padding:4px;background:var(--iq-surface-2,#262c3c);white-space:nowrap;font-size:10px}.tp-result{position:absolute;box-sizing:border-box;min-width:150px;padding:10px 12px 8px;background:var(--iq-up,#009a2d);border-radius:3px;pointer-events:auto;box-shadow:0 3px 14px #0003}.tp-result.lost{background:var(--iq-down,#c14331)}.tp-result.draw,.tp-result.refunded{background:var(--iq-surface-4,#3b404f)}.tp-result small{display:block;font-size:10px;font-weight:700;margin:0 20px 3px 0}.tp-result strong{font-size:22px}.tp-result-close{position:absolute;right:5px;top:5px;width:16px;height:16px;padding:0;border:0;color:#fff;background:transparent;cursor:pointer;font:16px IQRoboto}.tp-result-close:focus-visible{outline:2px solid #fff}.tp-request{position:absolute;bottom:45px;left:70px;padding:10px;background:var(--iq-surface-2,#262c3c);font-size:12px}@media(prefers-reduced-motion:no-preference){.tp-result.entering{animation:tp-appear 160ms ease-out}@keyframes tp-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}}

.tp-entry{top:7px}.tp-entry-dot{position:absolute;top:-8px;width:14px;height:14px;border-radius:50%;background:var(--iq-up,#009a2d);border:1px solid white;transform:translateX(-50%);display:grid;place-content:center;font-size:11px;color:white}.tp-strike.down .tp-entry-dot{background:var(--iq-down,#c14331)}
.tp-ticket.favorable .tp-expected{color:#56d873}.tp-ticket.unfavorable .tp-expected{color:#ff9587}.tp-ticket.unavailable,.tp-ticket.equal{border-left-color:var(--iq-text-secondary,#b5b6bc)}.tp-offscreen{color:var(--iq-text-secondary,#b5b6bc)}.ui-reduced-motion .tp-result{animation:none!important;transition:none!important}.tp-result[hidden]{display:none}.tp-strike.unknown{border-color:var(--iq-text-secondary,#b5b6bc)}
.tp-profit-header{position:absolute;display:flex;gap:28px;align-items:flex-start;padding:6px 10px;background:var(--iq-surface-1,#1c2233);border-radius:3px;max-width:calc(100% - 80px)}.tp-profit-header>div{display:flex;flex-direction:column;gap:5px}.tp-profit-header strong{font-size:21px;font-weight:300;white-space:nowrap}.tp-profit-header small{font-size:9px;color:var(--iq-text-secondary,#b5b6bc);max-width:100px}.tp-ticket.anchored{position:absolute;max-width:180px;height:32px;white-space:nowrap}.tp-ticket.anchored>span:first-child,.tp-ticket.anchored>.tp-expected{display:none}.tp-result.blitz{min-width:100px;min-height:32px;padding:6px 27px 6px 12px;border-radius:18px;background:#e8e9eacc;color:#12182a;box-shadow:0 2px 8px #0003}.tp-result.blitz strong{font-size:14px;line-height:20px}.tp-result.blitz small{display:none}.tp-result.blitz .tp-result-close{color:#12182a;top:8px}.tp-result.blitz.won strong{color:#008c29}.tp-result.blitz.lost strong{color:#b63727}@media(max-width:650px){.tp-profit-header{gap:10px;max-width:calc(100% - 70px);padding:6px}.tp-profit-header strong{font-size:13px;white-space:normal}.tp-profit-header small{font-size:8px}.tp-ticket.anchored{max-width:135px;font-size:9px;padding:0 8px;gap:6px}.tp-ticket.anchored strong{font-size:11px}}

.tp-ticket.anchored{border:0;background:var(--iq-up,#009a2d);opacity:.85;padding:0 9px;height:26px;transform:translateX(-50%)}.tp-ticket.anchored.down{background:var(--iq-down,#c14331)}.tp-ticket.anchored>span{display:none}.tp-ticket.anchored strong{font-size:13px;font-weight:400}.tp-result.blitz{background:#ffffffcc}

.tp-profit-header strong{font-family:IQRobotoLight,IQRoboto,Roboto,sans-serif;font-weight:300}.tp-entry-dot{font-size:9px}
.tp-layer,.tp-profit-header,.tp-ticket,.tp-result{font-variant-numeric:tabular-nums}.tp-profit-header>div{min-width:96px}.tp-profit-header strong{min-height:25px}.tp-ticket.anchored{min-width:58px;justify-content:center}.tp-result{transition:none!important}.tp-result.blitz{height:32px;min-height:32px;box-sizing:border-box}.tp-result.clipped:after{content:'';display:none}@media(max-width:650px){.tp-profit-header>div{min-width:60px}.tp-profit-header strong{min-height:18px}}
/* Resultado igual ao original (round20/exp f001–f044): pílula nasce no ponto de fechamento, cresce além do tamanho, assenta, fica ~3 s e encolhe até sumir. Sem popup. */
.tp-result.tp-badge{min-width:0;height:28px;padding:0 10px;border-radius:14px;display:flex;align-items:center;background:#2fa52f;color:#fff;box-shadow:0 0 18px #2fa52f66;transform-origin:50% 100%;pointer-events:none;animation:tp-badge 4.2s cubic-bezier(.2,.8,.2,1) both!important}
.tp-result.tp-badge strong{font:700 17px/1 IQRoboto,Roboto,sans-serif;color:#fff;white-space:nowrap}
.tp-result.tp-badge.lost{background:#4b505d;box-shadow:none}
.tp-result.tp-badge.draw,.tp-result.tp-badge.refunded{background:#4b505d;box-shadow:none}
@keyframes tp-badge{0%{transform:scale(.25)}14%{transform:scale(1.4)}22%{transform:scale(1)}94%{transform:scale(1)}100%{transform:scale(0)}}
@media (prefers-reduced-motion:reduce){.tp-result.tp-badge{animation:none!important}}
.tp-profit-header .tp-expiration strong,.tp-profit-header .tp-expiration small{color:#e5493a}
.tp-profit-header .tp-expiration strong:before{content:'';display:inline-block;width:15px;height:15px;margin-right:6px;vertical-align:-1px;background:currentColor;-webkit-mask:radial-gradient(circle at 50% 58%,transparent 4.5px,#000 5px 6.5px,transparent 7px);mask:radial-gradient(circle at 50% 58%,transparent 4.5px,#000 5px 6.5px,transparent 7px)}
.tp-profit-header .tp-rollover{align-self:center;height:32px;min-width:124px;padding:0 20px;border:0;border-radius:2px;background:#3a3f4c;color:#fff;font:13px IQRoboto,Roboto,sans-serif;opacity:.9;pointer-events:auto}
.tp-profit-header .tp-rollover:disabled{cursor:default}
/* Tabela de posições do painel de baixo (original round20/compra/c01) */
.ui-pos-table{width:100%;border-collapse:collapse;font:13px IQRoboto,Roboto,sans-serif}
.ui-pos-table th{font-weight:400;color:#a9adb8;text-align:right;padding:10px 12px;white-space:nowrap}
.ui-pos-table th.ui-pos-h-asset,.ui-pos-table th.ui-pos-h-type,.ui-pos-table th.ui-pos-h-expires{text-align:left}
.ui-pos-table td{color:#fff;text-align:right;padding:8px 12px;white-space:nowrap;border:0}
.ui-pos-table td:nth-child(-n+3){text-align:left}
.ui-pos-name .ui-table-detail{display:inline-flex;align-items:center;gap:8px;background:none;border:0;color:#fff;font:inherit;padding:0;cursor:pointer}
.ui-pos-gear{display:inline-block;width:14px;height:14px;margin-right:10px;vertical-align:-2px;background:#a9adb8;-webkit-mask:radial-gradient(circle,transparent 3px,#000 3.5px 6px,transparent 6.5px);mask:radial-gradient(circle,transparent 3px,#000 3.5px 6px,transparent 6.5px)}
.ui-pos-exp{color:#f58220!important}
.ui-pos-ring{display:inline-block;width:12px;height:12px;margin-right:5px;vertical-align:-2px;border:2px solid #f58220;border-radius:50%;box-sizing:border-box}
.ui-pos-dir{margin-left:10px;font-size:11px}.ui-pos-dir.up{color:#2fa52f}.ui-pos-dir.down{color:#e5493a}
.ui-pos-pl.pos,.ui-pos-footer b.pos,.ui-count-pnl.pos{color:#2fa52f}.ui-pos-pl.neg,.ui-pos-footer b.neg,.ui-count-pnl.neg{color:#e5493a}
.ui-pos-rollover{min-width:160px;height:30px;border:1px solid #3a3f4c;background:transparent;color:#fff;font:13px IQRoboto,Roboto,sans-serif;border-radius:2px}
.ui-pos-footer{display:flex;align-items:center;gap:20px;padding:6px 12px;border-top:1px solid #2c3140;color:#a9adb8;font:13px IQRoboto,Roboto,sans-serif}
.ui-pos-footer b{font-weight:400;color:#fff;margin-left:4px}
.ui-pos-footer .ui-pos-spacer{flex:1}
.ui-pos-ficon{width:14px;height:14px;border-radius:50%;background:#a9adb8;color:#1c2233;font:700 10px/14px IQRoboto;text-align:center}
.ui-pos-ficon.gear{border-radius:0;-webkit-mask:radial-gradient(circle,transparent 3px,#000 3.5px 6px,transparent 6.5px);mask:radial-gradient(circle,transparent 3px,#000 3.5px 6px,transparent 6.5px)}
.ui-pos-sellall{min-width:160px;height:30px;border:0;background:#3a3f4c;color:#fff;font:13px IQRoboto,Roboto,sans-serif;border-radius:2px}
.ui-count-pnl{margin:0 6px 0 8px}
.ui-pos-dir{display:inline-block;width:0;height:0;margin-left:12px;vertical-align:1px;border-left:6px solid transparent;border-right:6px solid transparent}
.ui-pos-dir.up{border-bottom:10px solid #2fa52f}.ui-pos-dir.down{border-top:10px solid #e5493a}
.ui-pos-rollover:disabled,.ui-pos-sellall:disabled{color:#fff;opacity:1;cursor:default}
.ui-pos-table td .ui-pos-dir{display:inline-block!important;width:0!important;height:0!important;padding:0!important;background:none!important;box-shadow:none!important;border-radius:0!important}
.ui-pos-table td .ui-pos-dir.up{border-top:0!important;border-bottom:10px solid #2fa52f!important}
.ui-pos-table td .ui-pos-dir.down{border-bottom:0!important;border-top:10px solid #e5493a!important}
.ui-pos-table .ui-pos-rollover:disabled,.ui-pos-footer .ui-pos-sellall:disabled{color:#fff!important;opacity:1!important;filter:none!important}

/* ---- Margin/CFD e Digital (ui-trade-presentation-margin.js; fontes round21 f4, mg-*, dg-*) ---- */
.mg-panel,.dg-box{display:none}
body.tp-kind-margin aside.trade>*:not(.mg-panel){display:none!important}
body.tp-kind-margin aside.trade>.mg-panel{display:flex}
.mg-panel{flex-direction:column;width:110px;font:12px IQRoboto,Roboto,sans-serif;color:#b5b6bc}
.mg-panel .mg-label,.dg-box .mg-label{display:flex;align-items:center;gap:4px;font-size:12px;color:#b5b6bc;line-height:14px}
.mg-q{display:inline-block;width:9px;height:9px;border-radius:50%;background:#b5b6bc;color:#3b404f;font:700 7px/9px IQRoboto,Roboto,sans-serif;text-align:center;font-style:normal}
.mg-box,.dg-box{position:relative;height:50px;margin:0 0 6px;padding:7px 25px 5px 10px;background:#3b3f4d;border-radius:2px;cursor:pointer}
.mg-box.mg-open,.mg-half.mg-open{box-shadow:inset 0 0 0 1px #6b7080}
.mg-value{display:flex;align-items:center;gap:4px;margin-top:4px;color:#f3f4f4;font-size:16px;line-height:20px;white-space:nowrap}
.mg-cur{color:#b5b6bc}
.mg-invest{width:60px;min-width:0;padding:0;border:0;background:transparent;color:#f3f4f4;font:16px IQRoboto,Roboto,sans-serif;outline:0}
.mg-steps{position:absolute;right:0;top:0;display:flex;flex-direction:column;width:18px;height:50px;border-left:1px solid #262c3c}
.mg-steps button{flex:1;padding:0;background:#3b3f4d;color:#f3f4f4;font:17px/1 IQRoboto,Roboto,sans-serif}
.mg-steps button+button{border-top:1px solid #262c3c}
.mg-plain{height:46px;padding:5px 10px}
.mg-pair{display:flex;flex-direction:column;margin:0 0 9px;background:#3b3f4d;border-radius:2px}
.mg-half{height:50px;padding:7px 10px 5px;cursor:pointer}
.mg-half+.mg-half{border-top:1px solid #2c3140}
.mg-pending{display:flex;align-items:center;justify-content:center;gap:6px;height:20px;margin:-4px 0 4px;color:#f3f4f4;font-size:13px}
.mg-pending[hidden]{display:none}
.mg-pending button{display:inline-flex;padding:0;color:#f3f4f4}
.mg-order{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:109px;width:110px;border-radius:3px;color:#fff;font:15px IQRoboto,Roboto,sans-serif}
.mg-order:disabled{filter:saturate(.6) brightness(.85);cursor:default}
.mg-buy{background:#44983d}.mg-sell{background:#b24c39}
.mg-order .mg-side{font:700 14px IQRoboto,Roboto,sans-serif;text-transform:uppercase}
.mg-order .mg-quote{font-size:15px;white-space:nowrap}
.mg-order .mg-quote big{font-size:19px;font-weight:700}
.mg-is-pending .mg-order .mg-quote{font-size:13px}.mg-is-pending .mg-order .mg-quote big{font-size:13px;font-weight:400}
body.tp-kind-margin .workspace .sentiment{display:none!important}
.mg-spread{width:100%;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;height:28px;padding:0 4px 0 10px;color:#b5b6bc;font-size:13px}
.mg-spread-value{color:#f3f4f4}
/* Digital: Expiration com relógio e horário absoluto; Profit com "%" menor. */
body.tp-kind-digital aside.trade>label.expiry{display:none!important}
body.tp-kind-digital aside.trade>.dg-box{display:block}
.dg-exp{display:flex;align-items:center;gap:4px;margin-top:4px;padding:0;color:#f3f4f4;font:16px IQRoboto,Roboto,sans-serif}
.dg-exp .native,.dg-exp svg,.dg-exp img{opacity:.85}
#payout .tp-pct{font-size:.55em;font-weight:300}
/* Popups ancorados à esquerda do painel. */
.mg-pop{position:fixed;z-index:60;min-width:152px;background:#1d2232;color:#f3f4f4;font:13px IQRoboto,Roboto,sans-serif;box-shadow:0 6px 24px rgba(0,0,0,.45);border-radius:2px}
.mg-pop h4{margin:0;padding:15px 18px;background:#272c3b;font:700 13px IQRoboto,Roboto,sans-serif;text-transform:uppercase;letter-spacing:.2px}
.mg-pop .mg-note{margin:0;padding:10px 14px 14px;color:#b5b6bc;font-size:12px;line-height:17px}
.mg-pop-leverage{width:153px}
.mg-levs{display:flex;flex-direction:column;padding:6px 6px 0}
.mg-levs button{height:36px;padding:0 16px;text-align:left;color:#f3f4f4;border-bottom:1px solid #2a3040;font-size:13px}
.mg-levs button.sel{background:#3b3f4d;border-radius:2px}
.mg-pop-tp,.mg-pop-sl{width:252px}
.mg-row{display:flex;gap:2px;padding:20px 18px 0}
.mg-pop-edit .mg-row{padding:12px 20px 0}
.mg-field{flex:1;display:block;height:48px;padding:6px 10px;background:#1d2232;border:1px solid #4b5060;border-radius:2px 0 0 2px}
.mg-pop-tp .mg-field,.mg-pop-sl .mg-field{background:#1d2232}
.mg-flabel{display:flex;justify-content:space-between;align-items:center;color:#b5b6bc;font-size:12px}
.mg-finput{display:flex;gap:2px;margin-top:3px;font-size:14px}
.mg-finput input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:#f3f4f4;font:14px IQRoboto,Roboto,sans-serif;outline:0}
.mg-finput input::placeholder{color:#6f7381}
.mg-unit{display:flex;align-items:center;justify-content:center;gap:8px;width:54px;background:#3b3f4d;font-size:17px;border-radius:0 2px 2px 0}
.mg-caret{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #f3f4f4}
.mg-pop-tp .mg-note,.mg-pop-sl .mg-note{text-align:center;color:#f3f4f4;font-size:13px;padding:14px 18px 20px}
.mg-pop-invest{width:98px;padding:0 0 6px}
.mg-presets{display:flex;flex-direction:column}
.mg-presets button{height:33px;color:#f3f4f4;font-size:13px;border-bottom:1px solid #2a3040}
.mg-avail{padding:10px 8px 0;text-align:center;color:#b5b6bc;font-size:11px}.mg-avail b{display:block;color:#f3f4f4;font:400 13px IQRoboto,Roboto,sans-serif;margin-top:2px}
.mg-last{display:flex;flex-direction:column;align-items:stretch;padding:8px 4px 0;gap:8px}
.mg-lastbtn{color:#b5b6bc;font-size:12px}.mg-tri{font-size:9px;margin-left:8px}
.mg-calc{height:34px;background:#3b3f4d;border-radius:2px}
.mg-calc-ico{display:inline-block;width:12px;height:16px;border:2px solid #b5b6bc;border-radius:2px;background:linear-gradient(#b5b6bc,#b5b6bc) 50% 3px/6px 2px no-repeat}
.mg-pop-edit{width:250px;padding-bottom:14px;background:#272c3b}
.mg-tabs{display:flex;align-items:center;height:42px;border-bottom:1px solid #1d2232}
.mg-tabs button{flex:1;height:42px;display:flex;align-items:center;justify-content:center;color:#b5b6bc}
.mg-tabs button.sel{border-bottom:2px solid #e9762a;color:#e9762a}
.mg-tabs button:last-child{flex:0 0 44px}
.mg-check{display:flex;align-items:center;gap:10px;margin:8px 20px 0;padding:8px 10px;background:#272c3b;border:1px solid #1d2232;color:#f3f4f4;font-size:12px;line-height:16px}
.mg-check input{width:18px;height:18px;margin:0;accent-color:#e9762a}
.mg-actions{display:flex;gap:8px;padding:12px 20px 0}
.mg-actions button{flex:1;height:34px;background:#3b3f4d;color:#f3f4f4;font:13px IQRoboto,Roboto,sans-serif;text-transform:uppercase;border-radius:2px}
.mg-actions .mg-apply{background:#da752c}
.mg-pop-expiry{width:140px;padding-top:4px;background:#1d2232}
.mg-pop-expiry h5{margin:0;padding:8px 16px 6px;color:#b5b6bc;font:400 10px IQRoboto,Roboto,sans-serif}
.mg-pop-expiry>button{display:flex;align-items:flex-start;gap:8px;width:calc(100% - 12px);margin:0 6px;padding:10px 10px 8px;color:#f3f4f4;text-align:left;border-radius:2px}
.mg-pop-expiry>button.sel{background:#3b3f4d}
.dg-rt{display:flex;flex-direction:column;flex:1}.dg-rt b{font:400 15px IQRoboto,Roboto,sans-serif}.dg-rt small{color:#b5b6bc;font-size:10px;margin-top:2px}
.dg-rp{font-size:9px;color:#b5b6bc;text-transform:uppercase}
.dg-pfoot{margin-top:176px;padding:0 6px 6px}.dg-pfoot button{width:100%;height:34px;background:#3b3f4d;border-radius:2px;color:#b5b6bc}
/* Lista do botão Close do cabeçalho. */
.mg-pop-close{width:622px;padding:0 24px 14px 34px;background:#1d2232}
.mg-cl-head,.mg-cl-row{display:grid;grid-template-columns:1fr 1fr 1fr 152px;align-items:center;height:36px;gap:0 8px}
.mg-cl-head{color:#b5b6bc;font-size:13px;height:40px}
.mg-cl-head span:nth-child(2),.mg-cl-row span:nth-child(2){text-align:center}
.mg-cl-head span:nth-child(3),.mg-cl-row span:nth-child(3){text-align:right}
.mg-cl-row{border-top:1px solid #2a3040;border-bottom:1px solid #2a3040}
.mg-cl-act{display:flex;align-items:center;gap:8px}
.mg-btn{min-width:98px;height:26px;padding:0 14px;background:#3b3f4d;color:#f3f4f4;font:13px IQRoboto,Roboto,sans-serif;border-radius:2px}
.mg-ico{display:inline-flex;padding:0;color:#b5b6bc}
.mg-cl-foot{display:flex;justify-content:flex-end;padding:52px 0 0}.mg-cl-foot .mg-btn{min-width:152px;height:32px}
.mg-dir{display:inline-block;width:0;height:0;margin:0 8px 0 0;vertical-align:1px;border-left:5px solid transparent;border-right:5px solid transparent}
.mg-dir.buy{border-bottom:8px solid #2fa52f}.mg-dir.sell{border-top:8px solid #e5493a}
.pos{color:#4c9f45!important}.neg{color:#d8573f!important}
.mg-pop .pos,.mg-head .pos,.mg-table .pos{color:#4c9f45}
/* Cabeçalho da posição aberta (BUY preço | INVEST | P/L | Close | lápis). */
.mg-head{position:absolute;z-index:7;top:14px;right:14px;display:flex;align-items:center;gap:0;height:40px;font:13px IQRoboto,Roboto,sans-serif;color:#f3f4f4}
.mg-head[hidden]{display:none}
.mg-hico{width:16px;height:16px;margin-right:10px;border-radius:50%;background:#44983d;position:relative}
.mg-hico::after{content:'';position:absolute;left:4px;top:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:6px solid #fff}
.mg-hico.sell{background:#b24c39}.mg-hico.sell::after{border-bottom:0;border-top:6px solid #fff;top:5px}
.mg-hcol{display:flex;flex-direction:column;min-width:120px}
.mg-hcol small{color:#b5b6bc;font-size:12px;text-transform:uppercase;line-height:14px}
.mg-hcol b{font:400 16px IQRoboto,Roboto,sans-serif;margin-top:2px;white-space:nowrap}
.mg-hpl{min-width:130px;margin-right:4px}
.mg-hclose{width:99px;height:32px;background:#3b3f4d;color:#f3f4f4;font:13px IQRoboto,Roboto,sans-serif;border-radius:2px 0 0 2px}
.mg-hclose.mg-open{background:#4a4f5d}
.mg-edit{width:31px;height:32px;margin-left:2px;display:inline-flex;align-items:center;justify-content:center;background:#3b3f4d;color:#f3f4f4;border-radius:0 2px 2px 0}
/* Camada do gráfico: linha de entrada, etiqueta no eixo, +TP/+SL e selo de P/L. */
.mg-layer{position:absolute;inset:0;z-index:4;pointer-events:none;font:12px IQRoboto,Roboto,sans-serif}
.mg-line{position:absolute;height:0;border-top:1px solid #3e8a3b;transform:translateY(-.5px)}
.mg-line.sell{border-top-color:#a8473a}.mg-line.pend{border-top-style:dashed}
.mg-tag{position:absolute;transform:translate(-100%,-50%);margin-left:-2px;padding:2px 6px;background:#44983d;color:#fff;font-size:12px;line-height:14px;border-radius:2px;white-space:nowrap}
.mg-tag.sell{background:#b24c39}
.mg-tpsl{position:absolute;transform:translate(-100%,-50%);margin-left:-76px;padding:1px 3px;border:1px solid #9a9ca6;background:#1c1f29;color:#e6e7ea;font-size:10px;line-height:11px;border-radius:2px}
.mg-dot{position:absolute;width:9px;height:9px;transform:translate(-50%,-50%);border-radius:50%;border:2px solid #fff;background:#44983d;box-shadow:0 0 14px 6px rgba(68,152,61,.35)}
.mg-dot.sell{background:#b24c39;box-shadow:0 0 14px 6px rgba(178,76,57,.35)}
.mg-pill{position:absolute;transform:translate(-50%,-100%);color:#f3f4f4;font-size:12px;white-space:nowrap}
/* Toast de fechamento no canto inferior esquerdo do gráfico. */
.mg-toasts{position:absolute;left:62px;bottom:42px;z-index:9;display:flex;flex-direction:column;gap:6px;pointer-events:none}
.mg-toast{display:flex;align-items:center;gap:10px;min-width:210px;height:44px;padding:0 12px;background:#2b303f;color:#f3f4f4;font:13px IQRoboto,Roboto,sans-serif;border-radius:3px;box-shadow:0 4px 16px rgba(0,0,0,.45);pointer-events:auto;animation:mg-toast-in .22s ease-out}
.mg-toast b{font-weight:400}.mg-toast-name{flex:1}
.mg-toast button{display:inline-flex;padding:0;color:#b5b6bc}
@keyframes mg-toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* Digital: PURCHASE TIME com anel e Hide All. */
.dg-purchase{position:absolute;z-index:4;width:0;pointer-events:none;font:10px IQRoboto,Roboto,sans-serif;color:#f3f4f4}
.dg-purchase[hidden]{display:none}
.dg-line{position:absolute;left:0;top:0;bottom:0;border-left:1px solid rgba(220,222,228,.55)}
.dg-purchase.dg-hidden .dg-line{display:none}
.dg-ptext{position:absolute;right:20px;top:calc(var(--dg-ring-top,300px) + 4px);width:52px;text-align:right;text-transform:uppercase;line-height:12px}
.dg-ring{position:absolute;left:-15px;top:var(--dg-ring-top,300px);width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#1d2232;border-radius:50%}
.dg-ring svg{position:absolute;inset:0}
.dg-track{fill:none;stroke:#4b5060;stroke-width:2}.dg-arc{fill:none;stroke:#f3f4f4;stroke-width:2;stroke-linecap:round}
.dg-ring b{position:relative;font:400 11px IQRoboto,Roboto,sans-serif}
.dg-hideall{position:absolute;z-index:5;transform:translateX(-100%);height:24px;padding:0 18px;background:#3b3f4d;color:#f3f4f4;font:12px IQRoboto,Roboto,sans-serif;border-radius:12px}
.dg-hideall[hidden]{display:none}
/* Barra inferior: aba Isolated margin, tabela de margem e linha de totais. */
#marginPositions{display:inline-flex;align-items:center;gap:0;height:32px;padding:0 15px;color:#f3f4f4;font:700 12px IQRoboto,Roboto,sans-serif;white-space:pre;border-radius:3px 3px 0 0}
#marginPositions .mg-tab-pnl{font-weight:400;margin-left:4px}
#marginPositions .mg-tab-x{display:inline-flex;margin-left:10px;font-weight:400}
#marginPositions .mg-tab-x[hidden]{display:none}
#marginPositions.active{background:#1c2233}
body.tp-bottom-margin #openPositions{background:transparent!important;font-weight:400}
body.ui-navigation.tp-mg-sum{--ui-bottom:62px}
body.tp-bottom-margin.ui-bottom-open #uiPortfolio{display:none}
#tpMarginPortfolio{display:none;min-width:0;overflow:auto;background:#1d2232}
body.tp-bottom-margin #tpMarginPortfolio{display:block}
body.tp-bottom-margin.ui-bottom-open #tpMarginPortfolio{height:calc(var(--ui-bottom) - 34px);display:flex;flex-direction:column}
.mg-table{flex:1;font:13px IQRoboto,Roboto,sans-serif}
.mg-trow{display:grid;grid-template-columns:34px minmax(110px,1.6fr) 1fr 1fr 1fr 1fr 1fr .8fr 1.1fr 136px;align-items:center;height:30px;color:#f3f4f4}
.mg-trow>span{white-space:nowrap;text-align:right;padding-right:8px}
.mg-trow>span:nth-child(-n+2){text-align:left}
.mg-thead{color:#b5b6bc;height:30px}
.mg-thead>span:nth-child(6),.mg-thead>span:nth-child(7),.mg-trow>span:nth-child(6),.mg-trow>span:nth-child(7){text-align:center}
.mg-gear{display:flex;align-items:center;justify-content:center;padding:0!important;color:#b5b6bc}
.mg-trow .mg-dir{margin:0 0 0 8px}
.mg-link{padding:0;color:#b5b6bc;font:13px IQRoboto,Roboto,sans-serif}
.mg-swap{color:#b5b6bc}
.mg-rowclose{min-width:122px;height:24px;background:transparent;border:1px solid #3b3f4d;margin-left:8px}
.mg-empty{display:flex;flex-direction:column;align-items:center;padding-top:30px;color:#b5b6bc}
.mg-empty p{margin:0 0 10px;font-size:13px}
.mg-select{display:inline-flex;align-items:center;gap:8px;height:24px;padding:0 20px;border:1px solid #3b3f4d;color:#f3f4f4;font:13px IQRoboto,Roboto,sans-serif;border-radius:2px}
.mg-foot{display:flex;align-items:center;gap:6px;height:30px;padding:0 12px 0 10px;background:#1d2232;color:#b5b6bc;font:13px IQRoboto,Roboto,sans-serif;border-top:1px solid #2a3040}
.mg-foot b{font-weight:400;color:#f3f4f4;margin-right:6px}
.mg-fq{width:13px;height:13px;border-radius:50%;background:#a9adb8;color:#1c2233;font:700 9px/13px IQRoboto;text-align:center;margin-right:6px}
.mg-fset{display:inline-flex;margin-right:10px}
.mg-fill{flex:1}
.mg-foot .mg-btn{min-width:122px;height:26px}
.mg-fx{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#3b3f4d;color:#f3f4f4;border-radius:2px}
/* Badge de quantidade no TOTAL PORTFOLIO. */
nav [data-panel="positions"]{position:relative}
.mg-badge{position:absolute;top:8px;left:calc(50% + 6px);min-width:15px;height:15px;padding:0 4px;border-radius:8px;background:#7f8590;color:#fff;font:700 9px/15px IQRoboto,Roboto,sans-serif;font-style:normal;text-align:center}
.mg-badge[hidden]{display:none}
/* Aba com posição de margem: bandeira continua, P/L no lugar da família, sem anel (f4, mg-buy2). */
.assetTab.ui-tab-has-trades.ui-tab-margin .ui-tab-icon{display:grid}
.assetTab.ui-tab-margin .ui-tab-ring{display:none!important}

/* mg-showpos: com a barra de posições aberta o painel Margin se compacta (BUY 70 px, SELL acima da barra). */
body.ui-bottom-open .mg-order{height:70px}
body.ui-bottom-open .mg-buy{margin-top:3px}

/* f4/mg-buy1: sem posições abertas e sem Total Portfolio, o original não mostra a barra inferior; o gráfico desce até o rodapé. */
body.execution-go:not(.ui-bottom-open):not(.ui-has-positions) main{grid-template-rows:minmax(230px,1fr) 0!important}
body.execution-go:not(.ui-bottom-open):not(.ui-has-positions) section.positions{display:none}

/* ---- Paridade round21 (idx 47–59) ---- */
/* mg-showpos: colunas alinhadas à direita a cada 144 px (Invest 400, Open 544, Current Price 688, TP 832, SL 976, Swap 1120, Net P/L 1262) e Close de 121 px. */
.mg-trow{grid-template-columns:53px 128px repeat(6,minmax(0,144fr)) minmax(0,142fr) 150px}
.mg-trow>span{padding-right:0}
.mg-trow>span:nth-child(6),.mg-trow>span:nth-child(7),.mg-thead>span:nth-child(6),.mg-thead>span:nth-child(7){text-align:right}
.mg-trow>.mg-gear{justify-content:flex-end;padding-right:11px!important}
.mg-trow .mg-dir{margin:0 0 0 8px;border-left-width:6px;border-right-width:6px}
.mg-trow .mg-dir.buy{border-bottom-width:9px}.mg-trow .mg-dir.sell{border-top-width:9px}
.mg-rowclose{min-width:0;width:121px;margin-left:15px}
/* mg-cl4: toast de fechamento 300×83 com bandeira de 32 px, nome e P/L grande em duas linhas e × no canto. */
.mg-toasts{left:51px;bottom:16px}
.mg-toast{position:relative;box-sizing:border-box;width:300px;min-width:0;height:83px;padding:0 40px 0 24px;gap:14px;background:#1f2333;border-radius:3px}
.mg-toast-ico{display:inline-flex;width:32px;height:32px;flex:none}
.mg-toast-txt{display:flex;flex-direction:column;min-width:0}
.mg-toast-name{flex:none;font:15px/18px IQRoboto,Roboto,sans-serif;color:#f3f4f4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-toast b{font:300 21px/25px IQRobotoLight,IQRoboto,Roboto,sans-serif;color:#f3f4f4;white-space:nowrap}
.mg-toast b.neg{color:#d4583f!important}.mg-toast b.pos{color:#4c9f45!important}
.mg-toast button{position:absolute;top:14px;right:14px;width:12px;height:12px;justify-content:center;align-items:center;color:#9a9ca6}
.mg-x{position:relative;display:inline-block;width:10px;height:10px}
.mg-x::before,.mg-x::after{content:'';position:absolute;left:-1px;top:4px;width:12px;height:1.6px;background:currentColor;border-radius:1px;transform:rotate(45deg)}
.mg-x::after{transform:rotate(-45deg)}
/* mg-price: "Pending ×" cinza e regular; BUY AT/SELL AT com as últimas casas maiores; sem a linha Spread (SELL 8 px abaixo). */
.mg-pending,.mg-pending button{color:#b5b6bc;font-weight:400}
.mg-pending .mg-x{width:9px;height:9px}.mg-pending .mg-x::before,.mg-pending .mg-x::after{top:3.5px;width:11px}
.mg-is-pending .mg-order .mg-quote{font-size:15px}.mg-is-pending .mg-order .mg-quote big{font-size:19px;font-weight:700}
.mg-is-pending .mg-spread{display:none}
.mg-is-pending .mg-sell{margin-top:8px}
/* mg-invest: popup estreito (120 px), valores à esquerda em fonte regular, calculadora e sem moldura no campo. */
.mg-pop-invest{min-width:0;width:120px;box-sizing:border-box;padding:9px 10px 10px}
.mg-presets button{height:33px;padding:0 0 0 16px;text-align:left;font-weight:400}
.mg-avail{padding:9px 0 0 16px;text-align:left}.mg-avail b{margin-top:3px}
.mg-last{padding:16px 0 0;gap:9px}
.mg-lastbtn{display:flex;align-items:center;justify-content:space-between;height:16px;padding:0 0 0 20px;margin-right:-4px;font-weight:400}
.mg-tri{width:0;height:0;margin:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid #b5b6bc}
.mg-calc{display:flex;align-items:center;justify-content:center;color:#b5b6bc}
.mg-calc-ico{border:0;background:none;width:14px;height:18px}
.mg-invest:focus,.mg-invest:focus-visible{outline:none!important;box-shadow:none!important;border:0!important;caret-color:#f58220}
/* mg-tp: TP/SL sem moldura de destaque; popup com campo 154×50 e respiros do original. */
.mg-half.mg-open{box-shadow:none}
.mg-pop-tp h4,.mg-pop-sl h4{height:46px;box-sizing:border-box;padding:16px 20px}
.mg-pop-tp .mg-row,.mg-pop-sl .mg-row{padding:20px 20px 0}
.mg-pop-tp .mg-field,.mg-pop-sl .mg-field{height:50px;box-sizing:border-box}
.mg-pop-tp .mg-note,.mg-pop-sl .mg-note{padding:16px 18px 19px;line-height:17.5px}
/* mg-lev: título de 36 px, lista 8 px abaixo e texto de 13 px quebrando como o original. */
.mg-pop-leverage h4{height:36px;box-sizing:border-box;padding:11px 15px}
.mg-pop-leverage .mg-levs{padding:8px 8px 0}
.mg-pop-leverage .mg-note{padding:8px 16px 16px;font-size:13px;line-height:17px}
/* Etiqueta de entrada encostada à esquerda da etiqueta de preço atual (mg-buy2). */
.mg-tag{margin-left:0}
/* dg-0: "Hide All" numa linha só, à direita do anel. */
.dg-hideall{white-space:nowrap;padding:0 18px;line-height:24px}
/* dg-0: "Profit ?" branco com ajuda; o bloco desce 6 px. */
body.tp-kind-digital aside.trade .profit{margin-top:6px}
body.tp-kind-digital aside.trade .profit>small{color:#f3f4f4}
body.tp-kind-digital aside.trade .profit>small::after{content:'?';display:inline-block;width:9px;height:9px;margin-left:4px;vertical-align:1px;border-radius:50%;background:#b5b6bc;color:#3b404f;font:700 7px/9px IQRoboto,Roboto,sans-serif;text-align:center}
/* Lápis simples no cabeçalho e na lista do Close (mg-close1, mg-edit). */
.mg-edit,.mg-cl-act .mg-ico{color:#9a9ca6}
/* Estado vazio: "+ Select asset" (mg-cl4, dg-0). */
.ui-select-asset{display:inline-flex;align-items:center;gap:12px}
/* Abas: 134 px; inativa só contorno, ativa #3a3e4c com sublinhado laranja de 2 px (aba/s000, f4). */
body.ui-navigation #assetTabs .assetTab:not(.addAsset){min-width:134px;width:134px;max-width:134px;box-sizing:border-box;padding-right:8px;background-color:transparent;border:1px solid #3a3e4c}
body.ui-navigation #assetTabs .assetTab.selected:not(.addAsset){background-color:#3a3e4c;border-bottom:2px solid #da752c}
.mg-avail span{display:block;font-size:10px;line-height:13px;white-space:nowrap}
.mg-tpsl{margin-left:0}
/* ---- Paridade round21, ajuste 2 ---- */
/* mg-showpos (idx 47): barra de 226 px (595–821) com 4 px escuros acima da faixa de 30 px; aba ativa 206 px, Options com contorno; cabeçalho 29 px + linha; linhas de 26 px; Close 124×24 a 12 px da borda; rodapé 30 px entre linhas. */
body.tp-bottom-margin.ui-bottom-open{--ui-bottom:226px}
body.tp-bottom-margin.ui-bottom-open section.positions{border-top:0;padding-top:4px;box-sizing:border-box;background:#1d2232}
body.tp-bottom-margin .positionsHead{height:30px!important;align-items:flex-end;background:#3a3e4c}
body.tp-bottom-margin .positionsHead #showPositions{height:30px!important}
body.tp-bottom-margin #marginPositions{box-sizing:border-box;height:29px;padding:0 24px 0 25px;font:700 13px IQRoboto,Roboto,sans-serif;border-radius:3px 3px 0 0}
body.tp-bottom-margin #marginPositions .mg-tab-pnl{font-weight:700;margin-left:4px}
body.tp-bottom-margin #openPositions{box-sizing:border-box;height:30px!important;min-width:0;padding:0 16px 0 24px;border:1px solid #575a66!important;border-bottom:0!important;border-radius:3px 3px 0 0;background:#3a3e4c!important;color:#9d9fa5!important;font:700 13px IQRoboto,Roboto,sans-serif!important}
body.tp-bottom-margin #openPositions #count{color:inherit}
body.tp-bottom-margin #openPositions .ui-count-pnl:empty{display:none}
body.tp-bottom-margin #openPositions b{display:inline-block;margin-left:8px;font:400 19px/1 IQRoboto,Roboto,sans-serif;color:#9d9fa5;vertical-align:-2px}
body.tp-bottom-margin.ui-bottom-open #tpMarginPortfolio{height:calc(var(--ui-bottom) - 34px)}
.mg-trow{height:26px}
.mg-thead{box-sizing:border-box;height:30px;padding-bottom:1px;background:linear-gradient(#373b4a,#373b4a) 45px 100%/calc(100% - 185px) 1px no-repeat}
.mg-rowclose{box-sizing:border-box;width:124px;height:24px;margin:0 12px 0 14px;border-color:#3a3e4c;color:#8e9198}
.mg-foot{box-sizing:border-box;height:32px;border-top:1px solid #3c404e}
.mg-foot .mg-btn{box-sizing:border-box;min-width:0;width:124px;height:24px;margin-right:0}
.mg-foot{padding:0 12px 0 7px}.mg-foot .mg-fq{margin-right:4px}.mg-foot .mg-fset{margin-right:11px}
/* mg-cl4 (idx 48): card do toast em y 500–583, 11 px acima da barra (que agora começa em 595). */
.mg-toasts{bottom:12px}
/* mg-cl4 (idx 59): "+ Select asset" 123×24 em cinza (#8e9198), '+' a 17 px da borda e texto 12 px depois; bloco vazio 11 px mais baixo. */
.mg-empty{padding-top:41px}
.mg-select{box-sizing:border-box;height:24px;padding:0 16px 0 17px;gap:12px;font-size:12px;border-color:#3a3e4c;color:#8e9198}
.mg-select .iq-native-icon{opacity:.62}
/* Aba Isolated margin sem posições: × fino de 10 px, 14 px após "(0)" e 16 px antes da borda; Options com o mesmo ×. */
body.tp-bottom-margin #marginPositions .mg-tab-x{margin:0 -8px 0 5.5px;color:#8d9098}
body.tp-bottom-margin #openPositions b{position:relative;width:10px;font:400 13px/15px IQRoboto,Roboto,sans-serif!important;color:transparent!important;vertical-align:baseline;text-indent:-99px}
body.tp-bottom-margin #openPositions b::before,body.tp-bottom-margin #openPositions b::after{content:'';position:absolute;left:-1px;top:7px;width:12px;height:1.5px;background:#9d9fa5;transform:rotate(45deg)}
body.tp-bottom-margin #openPositions b::after{transform:rotate(-45deg)}
/* mg-invest (idx 50): "Last amounts" em 10 px cinza (#8e9198); texto do popup com o traço fino do original. */
.mg-pop-invest{-webkit-font-smoothing:antialiased}
.mg-pop-invest .mg-lastbtn{font-size:10px;color:#8e9198}
/* idx 57: o "%" do payout é <small class="tp-pct"> e não herda o rótulo ".profit small" (bloco, cinza). */
#payout .tp-pct{display:inline;color:inherit;margin:0}
/* Abas de ativo (mg-buy1): linha em y 12, bandeira 24 px, nome a 44 px da borda, × menor e reticências. */
body.ui-navigation header.topbar>.gridButton,body.ui-navigation header.topbar>#assetTabs{margin-top:-4px}
body.ui-navigation #assetTabs .assetTab:not(.addAsset){padding-left:11px;gap:8px}
body.ui-navigation #assetTabs .assetTab .ui-tab-icon,body.ui-navigation #assetTabs .assetTab .ui-tab-icon .ui-instrument-icon{width:24px;height:24px;min-width:24px;flex:none}
body.ui-navigation #assetTabs .assetTab .ui-tab-label{min-width:0;overflow:hidden}
body.ui-navigation #assetTabs .assetTab .ui-tab-name{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
body.ui-navigation #assetTabs .assetTab .ui-tab-close{top:1px;left:3px;transform:scale(.72);transform-origin:50% 50%}
/* Popup do lápis (mg-edit): corpo #1d2232; só "When profit is" tem contorno, os demais campos são preenchidos; texto regular. */
.mg-pop-edit{background:#1d2232;font-weight:400;-webkit-font-smoothing:antialiased}
.mg-pop-edit .mg-tabs{background:#252b3b}
.mg-pop-edit .mg-row{padding:20px 20px 0}
.mg-pop-edit .mg-row+.mg-row{padding-top:4px}
.mg-pop-edit .mg-field{box-sizing:border-box;height:50px;background:#3a3e4c;border:0}
.mg-pop-edit .mg-tabs+.mg-row .mg-field{background:#1d2232;border:1px solid #3c404e}
.mg-pop-edit .mg-flabel,.mg-pop-edit .mg-finput,.mg-pop-edit .mg-check{font-weight:400}
.mg-pop-edit .mg-finput{gap:6px}
.mg-pop-edit .mg-check{box-sizing:border-box;min-height:51px;margin-top:6px;border:0;color:#b5b6bc;font-size:12px}
.mg-pop-edit .mg-actions{padding-top:14px}
.mg-pop-edit .mg-actions .mg-apply{font-weight:700}
/* Popup Close do cabeçalho (mg-close1): Leverage alinhado à direita da coluna, cabeçalho 4 px abaixo, popup 12 px mais alto embaixo e o botão não clareia aberto. */
.mg-pop-close{padding-bottom:26px;font-weight:400;-webkit-font-smoothing:antialiased}
.mg-cl-head span:nth-child(2),.mg-cl-row span:nth-child(2){text-align:right}
.mg-cl-head{box-sizing:border-box;height:41px;padding-top:7px}
.mg-hclose,.mg-hclose.mg-open{background:#3b3f4d;-webkit-font-smoothing:antialiased}
/* Ajuste (a), medido em round20/compra c00–c03 e fim1–fim6 (÷2 para px CSS): o bloco fica no topo do gráfico, sem caixa de fundo,
   ícone+dígitos 20 px abaixo do topo, Rollover a 11,5 px da borda direita (top/right vêm de ui-trade-presentation.js). A legenda do tempo
   quebra em "EXPIRATION / TIME" alinhada aos dígitos, como no original. */
.tp-profit-header{background:none}.tp-profit-header .tp-expiration small{max-width:60px;padding-left:21px}
/* Mobile (<=650 px): o gráfico tem ~295 px; os 3 valores ficam numa linha sem quebrar dígitos e o Rollover desce para a linha de baixo,
   alinhado à direita, em vez de vazar por trás do painel de compra. Nada é escondido. */
@media(max-width:650px){.tp-profit-header{flex-wrap:wrap;justify-content:flex-end;column-gap:8px;row-gap:6px;max-width:calc(100% - 50px)}.tp-profit-header>div{min-width:0}.tp-profit-header strong{white-space:nowrap}.tp-profit-header .tp-rollover{height:26px;min-width:0;padding:0 14px;font-size:11px}}
