/* TradeOS — Trava de risco */
.trv-overlay, .trv-toast, .trv-banner { font-family: var(--font-sans, "Inter", -apple-system, sans-serif); }
.trv-overlay svg, .trv-toast svg, .trv-banner svg { width: 18px; height: 18px; flex: none; }
.trv-overlay { position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center; padding: 24px; background: rgba(3, 4, 6, .74); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transition: opacity .3s ease; }
.trv-overlay.in { opacity: 1; }
.trv-overlay.out { opacity: 0; }
.trv-sheet { width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 26px 28px 22px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)), #0e1012; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9); color: #f2f0e9; transform: translateY(24px) scale(.97); transition: transform .55s cubic-bezier(.16, 1, .3, 1); }
.trv-overlay.in .trv-sheet { transform: none; }
.trv-overlay.out .trv-sheet { transform: translateY(16px) scale(.98); }
.trv-sheet header { display: flex; gap: 14px; align-items: flex-start; }
.trv-sheet header > div { flex: 1; min-width: 0; }
.trv-ico { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: rgba(216, 255, 62, .1); color: #d8ff3e; }
.trv-ico.big { width: 56px; height: 56px; border-radius: 18px; }
.trv-ico.big svg { width: 26px; height: 26px; }
.trv-kicker { margin: 0 0 6px; font: 600 11px/1 var(--font-sans); letter-spacing: .14em; color: #8a9096; }
.trv-sheet h2 { margin: 0; font: 600 28px/1.08 var(--font-display, inherit); letter-spacing: -.03em; color: #f2f0e9; }
.trv-sheet h2 span { color: #d8ff3e; }
.trv-sheet header p:last-child { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: #a3a9ae; }
.trv-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: #c9cdd1; font-size: 20px; line-height: 1; cursor: pointer; }
.trv-switch { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; cursor: pointer; font: 600 14px/1 var(--font-sans); }
.trv-switch input { position: absolute; opacity: 0; pointer-events: none; }
.trv-switch i { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .1); transition: background-color .25s; }
.trv-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c9cdd1; transition: transform .4s cubic-bezier(.16, 1, .3, 1), background-color .25s; }
.trv-switch input:checked + i { background: rgba(216, 255, 62, .28); }
.trv-switch input:checked + i::after { transform: translateX(18px); background: #d8ff3e; }
.trv-switch input:focus-visible + i { outline: 2px solid #d8ff3e; outline-offset: 2px; }
.trv-form { display: grid; gap: 10px; }
.trv-f { display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.trv-f:first-child { border-top: 0; }
.trv-f > span { font: 600 13.5px/1.3 var(--font-sans); color: #f2f0e9; }
.trv-f > span small { display: block; margin-top: 3px; font-weight: 500; font-size: 12px; color: #8a9096; }
.trv-f > div { display: flex; gap: 6px; }
.trv-f input, .trv-f select { height: 38px; min-width: 0; flex: 1; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: rgba(255, 255, 255, .04); color: #f2f0e9; font: 600 14px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.trv-f select { padding: 0 8px; }
.trv-f > div > select:not(:only-child) { flex: 0 0 74px; }
.trv-f input:focus, .trv-f select:focus { outline: none; border-color: rgba(216, 255, 62, .55); }
.trv-hint { margin: 12px 0 0; font-size: 12px; line-height: 1.45; color: #8a9096; }
.trv-sheet footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.trv-primary, .trv-ghost { height: 40px; padding: 0 18px; border-radius: 999px; font: 600 13.5px/1 var(--font-sans); cursor: pointer; }
.trv-primary { border: 0; background: #d8ff3e; color: #0b0c0d; }
.trv-ghost { border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: #c9cdd1; }
.trv-primary:hover { filter: brightness(1.06); }
.trv-ghost:hover { color: #f2f0e9; border-color: rgba(255, 255, 255, .24); }

/* tela de parar */
.trv-overlay.stop .trv-sheet { border-color: rgba(242, 54, 69, .28); background: radial-gradient(120% 70% at 50% 0%, rgba(242, 54, 69, .12), transparent 60%), #0e1012; }
.trv-stop { display: grid; justify-items: center; text-align: center; padding: 6px 0 4px; }
.trv-stop .trv-ico { margin-bottom: 14px; background: rgba(242, 54, 69, .14); color: #ff6b76; animation: trv-pulse 2.4s ease-in-out infinite; }
@keyframes trv-pulse { 50% { box-shadow: 0 0 0 10px rgba(242, 54, 69, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 54, 69, .28); } }
.trv-stop h2 { font-size: 36px; }
.trv-stop h2 span { color: #ff6b76; }
.trv-lead { margin: 12px 0 0; font-size: 14.5px; line-height: 1.55; color: #f2f0e9; }
.trv-quote { margin: 12px 0 0; font-size: 13px; color: #8a9096; }
.trv-rules { display: grid; gap: 12px; margin: 22px 0 0; padding: 16px; list-style: none; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.trv-rules li > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.trv-rules span { font-size: 12.5px; color: #a3a9ae; }
.trv-rules b { font: 600 14px/1 var(--font-sans); color: #f2f0e9; font-variant-numeric: tabular-nums; }
.trv-rules b em { font-style: normal; font-weight: 500; color: #8a9096; }
.trv-rules small { display: block; margin-top: 5px; font-size: 11.5px; color: #8a9096; }
.trv-bar { display: block; position: relative; height: 6px; margin-top: 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.trv-bar b { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #d8ff3e; transition: width .8s cubic-bezier(.16, 1, .3, 1); }
.trv-rules li.near .trv-bar b { background: #e0a43a; }
.trv-rules li.hit .trv-bar b { background: #f23645; }
.trv-rules li.hit small { color: #ff6b76; font-weight: 600; }

/* aviso perto do limite */
.trv-toast { position: fixed; right: 24px; bottom: 24px; z-index: 9050; display: flex; gap: 12px; align-items: flex-start; width: min(380px, calc(100vw - 48px)); padding: 14px 14px 14px 16px; border: 1px solid rgba(224, 164, 58, .35); border-radius: 16px; background: rgba(18, 17, 14, .96); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); color: #f2f0e9; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .5s cubic-bezier(.16, 1, .3, 1); }
.trv-toast.in { opacity: 1; transform: none; }
.trv-toast .trv-ico { width: 32px; height: 32px; border-radius: 10px; background: rgba(224, 164, 58, .14); color: #e0a43a; }
.trv-toast > div { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; color: #c9cdd1; }
.trv-toast > div b { display: block; margin-bottom: 2px; font-size: 13.5px; color: #f2f0e9; }
.trv-toast > button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: #c9cdd1; cursor: pointer; }

/* faixa no editor */
.trv-banner { display: flex; gap: 12px; align-items: flex-start; margin: 14px 26px 0; padding: 12px 14px; border: 1px solid rgba(242, 54, 69, .3); border-radius: 12px; background: rgba(242, 54, 69, .08); color: #ff8a93; }
.trv-banner.warn { border-color: rgba(224, 164, 58, .32); background: rgba(224, 164, 58, .08); color: #e0a43a; }
.trv-banner p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #c9cdd1; }
.trv-banner p b { color: #f2f0e9; }

@media (prefers-reduced-motion: reduce) { .trv-sheet, .trv-toast { transition: none; } .trv-stop .trv-ico { animation: none; } }
@media (max-width: 560px) { .trv-f { grid-template-columns: 1fr; } }

/* TradeOS — Importar do MT5 (usa a mesma folha da trava) */
.tri-sheet { width: min(720px, 100%); }
.tri-drop { display: grid; justify-items: center; gap: 6px; margin-top: 20px; padding: 34px 20px; border: 1.5px dashed rgba(255, 255, 255, .16); border-radius: 16px; background: rgba(255, 255, 255, .02); text-align: center; cursor: pointer; transition: border-color .25s, background-color .25s, transform .4s cubic-bezier(.16, 1, .3, 1); }
.tri-drop svg { width: 34px; height: 34px; margin-bottom: 6px; color: #d8ff3e; }
.tri-drop b { font: 600 15px/1.2 var(--font-sans); color: #f2f0e9; }
.tri-drop span { font-size: 12.5px; color: #8a9096; }
.tri-drop:hover, .tri-drop:focus-visible, .tri-drop.drag { outline: none; border-color: rgba(216, 255, 62, .6); background: rgba(216, 255, 62, .05); }
.tri-drop.drag { transform: scale(1.01); }
.tri-how { margin: 18px 0 0; padding: 0 0 0 18px; display: grid; gap: 7px; font-size: 12.5px; line-height: 1.45; color: #a3a9ae; }
.tri-how b { color: #f2f0e9; font-weight: 600; }
.tri-err { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(242, 54, 69, .1); color: #ff8a93; font-size: 12.5px; line-height: 1.45; }
.tri-wait { padding: 40px 0; text-align: center; color: #a3a9ae; }
.tri-sum { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.tri-sum > div { min-width: 0; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.tri-sum span { display: block; font: 600 10.5px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #8a9096; }
.tri-sum b { display: block; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/1.1 var(--font-sans); color: #f2f0e9; font-variant-numeric: tabular-nums; }
.tri-sum b.acid { color: #d8ff3e; } .tri-sum b.up, .tri-prev .up { color: #2fb67c; } .tri-sum b.down, .tri-prev .down { color: #f23645; }
.tri-note { margin: 10px 0 0; font-size: 12px; color: #8a9096; }
.tri-form { margin-top: 16px; }
.tri-check > div { justify-content: flex-end; }
.tri-check input { width: 20px; height: 20px; flex: none; accent-color: #d8ff3e; }
.tri-prev { margin-top: 16px; }
.tri-prev table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tri-prev th { padding: 0 8px 8px; text-align: left; font: 600 10.5px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #8a9096; }
.tri-prev td { padding: 8px; border-top: 1px solid rgba(255, 255, 255, .06); color: #c9cdd1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tri-prev td b { color: #f2f0e9; }
.tri-prev td small { color: #8a9096; }
.tri-prev .r { text-align: right; }
.tri-prev tr.dup td { opacity: .4; text-decoration: line-through; }
.trv-primary[disabled] { opacity: .45; cursor: default; }
.tri-done { display: grid; justify-items: center; text-align: center; padding: 26px 0 4px; }
.tri-done .trv-ico { font-size: 24px; font-weight: 700; }
.tri-done h3 { margin: 14px 0 0; font: 600 22px/1.2 var(--font-display, inherit); letter-spacing: -.02em; color: #f2f0e9; }
.tri-done p { margin: 8px 0 0; max-width: 440px; font-size: 13.5px; line-height: 1.5; color: #a3a9ae; }
.tri-entry svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .tri-sum { grid-template-columns: 1fr 1fr; } }

/* TradeOS — Revisão semanal guiada */
.trw-sheet { width: min(640px, 100%); }
.trw-sheet header .trv-ico { font: 700 13px/1 var(--font-sans); letter-spacing: .02em; }
.trw-dots { display: flex; gap: 6px; margin: 18px 0 4px; }
.trw-dots i { flex: 1; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); transition: background-color .5s; }
.trw-dots i.on { background: #d8ff3e; }
.trw-body { margin-top: 16px; animation: trw-in .55s cubic-bezier(.16, 1, .3, 1) both; }
.trw-body.from-right { animation-name: trw-right; } .trw-body.from-left { animation-name: trw-left; }
@keyframes trw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes trw-right { from { opacity: 0; transform: translateX(22px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes trw-left { from { opacity: 0; transform: translateX(-22px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.trw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.trw-grid > div { min-width: 0; padding: 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.trw-grid > .trw-big { grid-column: 1 / -1; background: radial-gradient(120% 140% at 0% 0%, rgba(216, 255, 62, .07), transparent 60%), rgba(255, 255, 255, .02); }
.trw-grid span { display: block; font: 600 10.5px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #8a9096; }
.trw-grid b { display: block; margin-top: 10px; font: 600 24px/1 var(--font-display, inherit); letter-spacing: -.02em; color: #f2f0e9; font-variant-numeric: tabular-nums; }
.trw-big b { font-size: 36px; }
.trw-grid em { font-style: normal; }
.trw-grid small { display: block; margin-top: 8px; font-size: 12px; color: #8a9096; }
.trw-sheet .up { color: #2fb67c; } .trw-sheet .down { color: #f23645; } .trw-sheet .acid { color: #d8ff3e; }
.trw-line { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; color: #a3a9ae; }
.trw-line b { color: #f2f0e9; font-weight: 600; }
.trw-line i, .trw-ins i, .trw-f span i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #8a9096; }
.trw-sheet i.up { background: #2fb67c; } .trw-sheet i.down { background: #f23645; } .trw-sheet i.acid { background: #d8ff3e; }
.trw-ins { display: grid; gap: 10px; margin: 0; padding: 14px 16px; list-style: none; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.trw-ins li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.5; color: #c9cdd1; }
.trw-ins li i { transform: translateY(-1px); }
.trw-ins b { color: #f2f0e9; font-weight: 600; }
.trw-f { display: grid; gap: 8px; margin-top: 14px; }
.trw-f > span { display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font-sans); color: #f2f0e9; }
.trw-f textarea { width: 100%; min-height: 64px; padding: 11px 13px; resize: vertical; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: rgba(255, 255, 255, .035); color: #f2f0e9; font: 500 13.5px/1.5 var(--font-sans); }
.trw-f textarea::placeholder { color: #6b7177; }
.trw-f textarea:focus { outline: none; border-color: rgba(216, 255, 62, .55); background: rgba(216, 255, 62, .03); }
.trw-lead { margin: 0; font-size: 13.5px; line-height: 1.5; color: #a3a9ae; }
.trv-err { margin: 12px 0 0; font-size: 12.5px; color: #ff8a93; }
.trw-plan { display: grid; gap: 8px; width: 100%; margin: 20px 0 0; text-align: left; }
.trw-plan > div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; }
.trw-plan dt { font: 700 11px/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.trw-plan dd { margin: 0; font-size: 13.5px; line-height: 1.45; color: #f2f0e9; }
.trw-offer { border-color: rgba(216, 255, 62, .3); background: rgba(14, 16, 18, .97); }
.trw-offer .trv-ico { background: rgba(216, 255, 62, .12); color: #d8ff3e; font-size: 15px; }
.trw-acts { display: flex; gap: 8px; margin: 12px 0 0; }
.trv-primary.sm, .trv-ghost.sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
@media (max-width: 640px) { .trw-grid { grid-template-columns: 1fr 1fr; } }

/* botão Importar do MT5 no topo de Operações (contorno, ao lado do botão principal) */
#app .ops2-controls .ops2-action.tri-head { display: inline-flex !important; align-items: center; gap: 8px; background: transparent !important; color: var(--bone) !important; border: 1px solid var(--line2) !important; box-shadow: none !important; }
#app .ops2-controls .ops2-action.tri-head:hover { border-color: rgba(216, 255, 62, .5) !important; color: var(--acid) !important; }
#app .ops2-controls .ops2-action.tri-head svg { width: 15px; height: 15px; }
