/* Crystal styling is scoped to the individual trade dialog. */
#modal.ft151-crystal{background:rgba(3,6,16,.76)!important;backdrop-filter:blur(5px);padding:20px!important}
#modal.ft151-crystal>.modalbox{position:relative;width:min(620px,100%)!important;max-width:620px!important;max-height:calc(var(--ft-vv-height,100dvh) - 40px)!important;border:1px solid color-mix(in srgb,var(--accent,#9a6aff) 70%,#a6b3d2)!important;border-radius:24px!important;background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--accent,#8b5cf6) 20%,transparent),transparent 48%),radial-gradient(ellipse at 0% 100%,color-mix(in srgb,var(--accent,#8b5cf6) 12%,transparent),transparent 44%),#0c1222!important;box-shadow:0 24px 90px #000a,0 0 28px color-mix(in srgb,var(--accent,#8b5cf6) 16%,transparent),inset 0 0 25px #b5c1ff08!important;overflow:hidden!important;padding:0!important;color:#eff2ff}
#modal.ft151-crystal .modalhead{padding:20px 22px!important;background:transparent!important;border-bottom:1px solid #b7c6ef12!important;flex:none!important}
.ft151-heading{display:flex;align-items:center;gap:12px;min-width:0}.ft151-logo{width:44px;height:44px;flex:none;padding:6px;border:1px solid #a0a9de2b;border-radius:13px;background:#090d1aaa}.ft151-title-wrap{min-width:0}#modal.ft151-crystal h3{font-size:21px!important;letter-spacing:-.4px;margin:0!important;color:#f2f3ff!important}.ft151-account{font-size:12px;color:#a4afd1;margin:6px 0 0;overflow-wrap:anywhere}#modal.ft151-crystal .close{width:34px;height:34px;border:1px solid #b5bfed15;background:#b5bfed08;border-radius:11px;color:#b9c5ed;font-size:25px}
#modal.ft151-crystal #form{min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#modal.ft151-crystal .ft-dialog-scroll{padding:18px 22px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 18px!important;min-height:0!important;overscroll-behavior:contain}
#modal.ft151-crystal .field{min-width:0;margin:0!important}#modal.ft151-crystal .field.full,#modal.ft151-crystal .ft151-results,#modal.ft151-crystal .ft151-pnl,#modal.ft151-crystal .ft151-divider,#modal.ft151-crystal .ft151-extras,#modal.ft151-crystal #ft72TradeError{grid-column:1/-1!important}
#modal.ft151-crystal label{font-size:12px!important;line-height:1.5!important;color:#bac5e8!important;margin:0 0 7px!important;display:block}
#modal.ft151-crystal input:not([type=file]),#modal.ft151-crystal select,#modal.ft151-crystal textarea{width:100%!important;box-sizing:border-box!important;min-width:0!important;min-height:43px!important;background:linear-gradient(120deg,#11182b,#101628)!important;border:1px solid #7781b94a!important;border-radius:11px!important;color:#eff2ff!important;box-shadow:inset 0 1px 7px #0002!important;font-size:14px!important;padding:11px 12px!important}
#modal.ft151-crystal input:focus,#modal.ft151-crystal select:focus,#modal.ft151-crystal textarea:focus{outline:2px solid color-mix(in srgb,var(--accent,#9865ff) 65%,transparent)!important;outline-offset:1px;border-color:var(--accent,#9865ff)!important}
#modal.ft151-crystal input::placeholder,#modal.ft151-crystal textarea::placeholder{color:#68759c}
#modal.ft151-crystal [hidden]{display:none!important}.ft151-result-buttons{display:grid;grid-template-columns:repeat(3,1fr);padding:5px;border:1px solid #7a87bd4a;border-radius:17px;background:linear-gradient(100deg,#121a2c,#1b2040);gap:4px}.ft151-result-buttons button{display:flex;gap:8px;align-items:center;justify-content:center;min-height:44px;padding:10px 8px;border:1px solid transparent;border-radius:12px;background:transparent;color:#bac5e8;font:inherit;font-size:14px;cursor:pointer}.ft151-result-buttons svg{width:18px;height:18px;flex:none}.ft151-result-buttons button[aria-pressed=true]{border-color:#70edcc;background:linear-gradient(115deg,#214e57,#17243a);box-shadow:inset 0 0 15px #56dfc321,0 0 12px #54e6c01c;color:#bbffeb}.ft151-result-buttons [data-result=Loss][aria-pressed=true]{border-color:#ed788c;background:linear-gradient(115deg,#51273e,#22213c);color:#ffc2d0;box-shadow:inset 0 0 14px #e8718b15}.ft151-result-buttons [data-result=BE][aria-pressed=true]{border-color:#a3aacb;background:#2a3048;color:#e1e6ff;box-shadow:none}.ft151-result-buttons button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ft151-pnl-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:4px 0 5px}.ft151-pnl-head small{font-size:10px;line-height:1.5;color:#8f9cbc;text-align:right}.ft151-money{display:flex;border:1px solid var(--accent,#9b77fb);border-radius:12px;overflow:hidden;background:#10172b}.ft151-money>span{display:grid;place-items:center;width:45px;flex:none;font-size:23px;color:#b5baff;border-right:1px solid #6878b13b}#modal.ft151-crystal .ft151-money #pnlInput{border:0!important;border-radius:0!important;min-height:62px!important;padding:12px 16px!important;font-size:29px!important;font-weight:700;letter-spacing:.5px;background:transparent!important;outline-offset:-3px!important}#modal.ft151-crystal[data-result=Win] .ft151-money #pnlInput{color:#9ff1d2!important}#modal.ft151-crystal[data-result=Loss] .ft151-money #pnlInput{color:#ffb0c0!important}.ft151-divider{display:flex;align-items:center;gap:15px;font-size:11px;color:#8f9dbc;margin:6px 0}.ft151-divider:before,.ft151-divider:after{content:'';height:1px;background:#6675a745;flex:1}
.ft151-extras{border:1px solid #7a87bd4a;border-radius:13px;background:#141b2c88;overflow:hidden}.ft151-extras summary{min-height:49px;display:flex;align-items:center;gap:9px;padding:10px 13px;cursor:pointer;list-style:none;color:#d4dcf6;font-size:13px}.ft151-extras summary::-webkit-details-marker{display:none}.ft151-extras summary svg{width:18px;height:18px;color:#a4b5e5}.ft151-extras summary small{font-size:10px;border:1px solid #6878a850;background:#242b4680;color:#a5b3d7;border-radius:20px;padding:3px 7px}.ft151-extras summary:after{content:'⌄';margin-left:auto;font-size:18px}.ft151-extras[open] summary:after{transform:rotate(180deg)}.ft151-extra-body{padding:0 13px 13px;display:grid;gap:13px}#modal.ft151-crystal #note{min-height:85px!important;resize:vertical}#modal.ft151-crystal #ft73Images{padding:0!important}#modal.ft151-crystal #ft73Images p{font-size:11px;line-height:1.5;color:#8f9dbc}
#modal.ft151-crystal .actions{padding:15px 22px 10px!important;border-top:1px solid #6576aa30!important;background:#0c1222e8!important;display:grid!important;grid-template-columns:1fr 1.5fr!important;gap:12px!important;flex:none!important;margin:0!important}
#modal.ft151-crystal .actions .btn{min-height:44px;border-radius:12px;font-size:13px;background:#1b2337;border:1px solid #7a87bd4a;color:#e6ecff;display:flex;gap:8px;align-items:center;justify-content:center}#modal.ft151-crystal .actions .primary{background:linear-gradient(115deg,var(--accent,#8756f8),color-mix(in srgb,var(--accent,#8756f8) 70%,#b6a8ff));border-color:#c0a9ff77;color:#fff;box-shadow:inset 0 1px 7px #fffa;border-width:1px}.ft151-actions svg{width:16px;height:16px}.ft151-foot{color:#8f9dbc;text-align:center;font-size:10px;line-height:1.5;padding:2px 20px 15px;margin:0!important;flex:none}
@media(max-width:700px){#modal.ft151-crystal{padding:12px!important;align-items:center!important}#modal.ft151-crystal>.modalbox{width:100%!important;border-radius:21px!important;max-height:calc(var(--ft-vv-height,100dvh) - 24px)!important}#modal.ft151-crystal .modalhead{padding:15px!important}#modal.ft151-crystal h3{font-size:19px!important}.ft151-logo{width:39px;height:39px}.ft151-account{font-size:10px}#modal.ft151-crystal .ft-dialog-scroll{padding:14px 15px!important;gap:12px!important}#modal.ft151-crystal input:not([type=file]),#modal.ft151-crystal select,#modal.ft151-crystal textarea{font-size:16px!important;padding:10px!important}.ft151-pnl-head small{max-width:130px}#modal.ft151-crystal .ft151-money #pnlInput{font-size:27px!important;min-height:57px!important}#modal.ft151-crystal .actions{padding:12px 15px 8px!important}.ft151-foot{font-size:9px;padding:2px 13px calc(12px + env(safe-area-inset-bottom));}.ft151-result-buttons button{font-size:12px}.ft151-result-buttons{gap:2px}}
@media(prefers-reduced-motion:reduce){#modal.ft151-crystal{backdrop-filter:none}}
/* A previous save toast must not cover the open form's mobile footer. */
body:has(#modal.ft151-crystal.show) #ft67Toast{visibility:hidden;pointer-events:none}
/* The fields area scrolls; never let it squash the "Nota y capturas" section (overflow:hidden lets grid shrink it to a few px). */
#modal.ft151-crystal .ft151-extras{min-height:max-content!important;flex-shrink:0}
#modal.ft151-crystal .ft-dialog-scroll{grid-auto-rows:max-content!important;align-content:start!important}
/* Comisión y swap (js/trade-fees.js) */
#modal .jf-fees{grid-column:1/-1}
#modal .jf-fees-hint{margin:6px 2px 0;font-size:12px;color:#9aa6cc;line-height:1.4}
#modal .jf-fees-hint.on{color:#c4b5fd;font-weight:600}
#modal .jf-fees-hint.err{color:#f87171}
