*{box-sizing:border-box}:root{--bg:#020912;--bg2:#03101a;--card:#081624;--card2:#04101a;--line:#123a59;--text:#eef8ff;--muted:#7fa0b7;--cyan:#38dfff;--green:#1ee5a4}html[data-theme=light]{--bg:#edf4fa;--bg2:#fff;--card:#fff;--card2:#f7fbff;--line:#bed6e8;--text:#0b2035;--muted:#58758d;--cyan:#0879d9;--green:#079c6b}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;transition:.25s}.hidden{display:none!important}.screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 70% 20%,#0b2946,var(--bg) 45%)}.card{background:linear-gradient(180deg,var(--card),var(--card2));border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 40px #0002}.login{width:min(420px,92vw);padding:28px}.brand{display:flex;align-items:center;gap:12px}.brand b{letter-spacing:4px}.brand small{display:block;color:var(--cyan)}.logo{font-size:32px;font-weight:900;color:var(--cyan)}.login input,.search{width:100%;padding:13px;border-radius:10px;border:1px solid var(--line);background:var(--card2);color:var(--text);margin:7px 0}.login button,button{padding:10px 12px;border:0;border-radius:10px;background:linear-gradient(90deg,#147cff,#00b7ff);color:#fff;font-weight:700;cursor:pointer}.login button{width:100%;margin-top:10px}.note{display:block;color:var(--muted);margin-top:14px}.secondary{background:var(--card2);border:1px solid var(--line);color:var(--text)}header{min-height:68px;display:flex;align-items:center;gap:14px;padding:10px 18px;border-bottom:1px solid var(--line);background:var(--bg2);position:sticky;top:0;z-index:10}header .brand{min-width:225px}.search{max-width:500px;margin:0}.theme-switch{display:flex;gap:5px;margin-left:auto}.theme-switch button{background:var(--card2);color:var(--text);border:1px solid var(--line);font-size:12px}.role-pill{padding:7px 10px;border:1px solid var(--cyan);border-radius:999px;color:var(--cyan);font-size:11px;font-weight:800}.layout{display:grid;grid-template-columns:190px 1fr;min-height:calc(100vh - 68px)}aside{padding:12px;border-right:1px solid var(--line);background:var(--bg2)}.nav{width:100%;text-align:left;margin:3px 0;background:transparent;color:var(--text)}.nav.active,.nav:hover{background:#0a294355;box-shadow:inset 3px 0 var(--cyan)}main{padding:12px}.grid{display:grid;grid-template-columns:1.6fr 1fr 1fr;gap:12px}.chart{grid-column:1/3;min-height:420px}.title{padding:12px 14px;border-bottom:1px solid var(--line);font-weight:800}.title span{float:right;color:var(--green)}.toolbar{display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid var(--line);flex-wrap:wrap}.toolbar button{background:var(--card2);color:var(--text);border:1px solid var(--line);padding:6px 8px}.toolbar .active-tool{outline:1px solid var(--cyan)}.price{font-size:28px;font-weight:800;padding:16px}.fakechart{height:245px;margin:0 18px;background:linear-gradient(170deg,transparent 0 45%,#21d5ff22 46% 47%,transparent 48%),repeating-linear-gradient(0deg,var(--line) 0 1px,transparent 1px 38px),repeating-linear-gradient(90deg,var(--line) 0 1px,transparent 1px 48px);border-bottom:3px solid var(--cyan)}.chips{padding:12px;display:flex;gap:8px;flex-wrap:wrap}.chips i{font-style:normal;padding:6px 8px;border:1px solid var(--line);border-radius:8px;color:var(--muted)}.score{text-align:center;font-size:60px;color:var(--green);font-weight:900;padding:18px}.score small{display:block;font-size:14px}.rows p,.list p{padding:10px 14px;border-top:1px solid var(--line);margin:0}.rows b,.list b{float:right;color:var(--green)}.ai-budget{margin:12px;padding:10px;border:1px solid var(--line);border-radius:10px;display:flex;justify-content:space-between;color:var(--muted)}.brain{height:260px;position:relative;background:radial-gradient(circle,#07305a33,var(--card2) 65%)}.brain span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:86px;height:86px;border-radius:50%;display:grid;place-items:center;border:1px solid #ffb74a;color:#ffd06d;box-shadow:0 0 35px #ffad3355}.brain i{position:absolute;width:58px;height:58px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--cyan);color:var(--cyan);font-style:normal}.brain i:nth-of-type(1){left:43%;top:8%}.brain i:nth-of-type(2){right:8%;top:30%}.brain i:nth-of-type(3){left:8%;top:30%}.brain i:nth-of-type(4){right:14%;bottom:12%}.brain i:nth-of-type(5){left:14%;bottom:12%}.center{text-align:center}.mic{font-size:54px;margin:24px}.guest-quota,.guest-note{display:block;color:#ffbf66;padding:10px}.full{min-height:70vh;padding-bottom:20px}.full .search{margin:18px;max-width:600px}.projects{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;padding:18px}.projects div{padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--card2)}@media(max-width:1100px){.grid{grid-template-columns:1fr 1fr}.chart{grid-column:1/3}.theme-switch{order:4;width:100%;margin-left:0}}@media(max-width:760px){header{flex-wrap:wrap}.layout{grid-template-columns:1fr}aside{display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--line)}.nav{min-width:max-content}.grid{grid-template-columns:1fr}.chart{grid-column:1}.main{padding:8px}}


.login-screen{position:relative;overflow:hidden;padding:24px}.login-bg{position:absolute;inset:0;overflow:hidden;background:radial-gradient(circle at 70% 18%,rgba(33,104,181,.28),transparent 0 34%),radial-gradient(circle at 30% 85%,rgba(0,182,255,.10),transparent 0 22%),linear-gradient(90deg,#020912 0%,#03101a 48%,#041524 100%)}.ql-watermark{position:absolute;inset:auto 0 8% 0;text-align:center;font-size:min(20vw,220px);font-weight:900;letter-spacing:10px;color:rgba(86,225,255,.06);text-shadow:0 0 40px rgba(56,223,255,.05)}.glow{position:absolute;border-radius:50%;filter:blur(60px);opacity:.45}.glow-a{width:340px;height:340px;right:12%;top:12%;background:#0ba0ff22}.glow-b{width:300px;height:300px;left:10%;bottom:8%;background:#00d2ff18}.grid-fx{position:absolute;inset:0;background:linear-gradient(rgba(255,255,255,.02) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.02) 1px,transparent 1px);background-size:48px 48px;mask-image:linear-gradient(to bottom,transparent,black 18%,black 75%,transparent)}.login-shell{position:relative;z-index:1;display:grid;grid-template-columns:minmax(280px,520px) minmax(320px,420px);gap:34px;align-items:center;width:min(1120px,94vw)}.welcome-panel{padding:28px 10px 28px 12px}.hero-brand{margin-bottom:30px}.eyebrow{display:inline-block;margin-bottom:14px;padding:8px 12px;border:1px solid rgba(56,223,255,.35);border-radius:999px;color:var(--cyan);font-size:12px;letter-spacing:1.5px;font-weight:700}.hero-copy h1{font-size:clamp(38px,4.7vw,72px);line-height:1.02;margin:0 0 16px}.hero-copy p{max-width:620px;color:var(--muted);font-size:18px;line-height:1.5}.hero-chips{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.hero-chips span{padding:10px 14px;border:1px solid rgba(56,223,255,.22);border-radius:12px;background:rgba(4,16,26,.48);color:var(--text);box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}.login{width:100%;padding:28px;backdrop-filter:blur(14px);background:linear-gradient(180deg,rgba(8,22,36,.92),rgba(4,16,26,.92))}.login .brand{margin-bottom:8px}.login h1{font-size:42px;margin:16px 0 8px}.login p{color:var(--muted);margin-bottom:16px}.login input{height:48px}.login button{height:48px}.login .note{line-height:1.45}.layout{display:grid;grid-template-columns:200px 1fr;min-height:calc(100vh - 68px)}aside{padding:12px;border-right:1px solid var(--line);background:linear-gradient(180deg,var(--bg2),rgba(3,16,26,.92))}.nav{width:100%;text-align:left;margin:4px 0;background:transparent;color:var(--text);border:1px solid transparent}.nav.active,.nav:hover{background:#0a294355;box-shadow:inset 3px 0 var(--cyan);border-color:#12466a}.title{letter-spacing:.3px}.title span{float:right;color:var(--green);font-size:13px}.card{overflow:hidden}.center .ask-ai{min-width:190px}.voice-float{position:fixed;right:18px;bottom:18px;z-index:20}.voice-float button{border-radius:999px;padding:14px 18px;box-shadow:0 10px 30px rgba(0,0,0,.28)}@media(max-width:980px){.login-shell{grid-template-columns:1fr}.welcome-panel{padding:0 4px}.hero-copy h1{font-size:42px}.ql-watermark{font-size:120px;bottom:4%}}@media(max-width:760px){.login-screen{padding:18px}.welcome-panel{display:none}.login{max-width:420px;margin:auto}.ql-watermark{font-size:72px;letter-spacing:4px}.login h1{font-size:34px}}
.trader-shell{display:grid;grid-template-columns:260px 1fr 320px;gap:12px}.trader-main{display:grid;grid-template-rows:auto auto;gap:12px}.lower-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin-top:12px}.market-rail,.brain-panel{min-height:100%}.market-tabs{display:flex;gap:6px;padding:10px 12px;flex-wrap:wrap}.market-tabs button{background:var(--card2);color:var(--text);border:1px solid var(--line);padding:6px 10px}.market-search{padding:0 12px 10px}.mini{margin:0}.market-list{padding:0 10px 12px;display:flex;flex-direction:column;gap:8px}.market-item{display:flex;align-items:center;justify-content:space-between;padding:12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.015)}.market-item.active,.market-item:hover{border-color:#1e7fd1;background:#0a294333;box-shadow:0 0 0 1px rgba(56,223,255,.15) inset}.market-item span{display:flex;flex-direction:column;gap:2px}.market-item small{color:var(--muted)}.market-item em{font-style:normal;color:var(--green);font-weight:700}.ticker-strip{display:flex;gap:12px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--line);color:var(--muted)}.ticker-strip b{color:var(--text)}.trading-card .price{padding-bottom:10px}.trader-bottom{display:grid;grid-template-columns:1.1fr .9fr;gap:12px}.positions-card,.news-card{min-height:220px}.position-row{display:flex;align-items:center;justify-content:space-between;padding:14px;border-top:1px solid var(--line);gap:14px}.position-row small{display:block;color:var(--muted);margin-top:4px}.pos{color:var(--green)!important}.neutral{color:var(--cyan);font-weight:700}.brain-top{display:grid;grid-template-columns:130px 1fr;gap:10px;padding:12px}.score.compact{font-size:44px;padding:8px 0;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.02)}.consensus-box{display:grid;gap:8px}.consensus-box p{margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.015);display:flex;justify-content:space-between;gap:10px}.consensus-box span{color:var(--muted)}.brain-quote{margin:12px;border:1px solid var(--line);border-radius:12px;padding:12px;color:var(--text);background:linear-gradient(180deg,rgba(56,223,255,.05),transparent)}.brain-mini{height:180px;margin:12px;position:relative;border:1px solid var(--line);border-radius:14px;background:radial-gradient(circle at center,rgba(56,223,255,.10),transparent 45%),linear-gradient(180deg,rgba(255,255,255,.015),transparent)}.mini-node{position:absolute;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--cyan);color:var(--cyan);background:rgba(0,0,0,.12)}.mini-node.core{left:50%;top:50%;transform:translate(-50%,-50%);width:82px;height:82px;border-color:#ffb74a;color:#ffd06d;box-shadow:0 0 24px rgba(255,173,51,.35)}.mini-node.n1{left:18%;top:18%}.mini-node.n2{right:14%;top:20%}.mini-node.n3{left:12%;bottom:14%}.mini-node.n4{right:16%;bottom:12%}@media(max-width:1300px){.trader-shell{grid-template-columns:240px 1fr}.brain-panel{grid-column:1/3}.lower-grid{grid-template-columns:1fr 1fr}.lower-grid .center{grid-column:1/3}}@media(max-width:980px){.trader-shell{grid-template-columns:1fr}.trader-bottom,.lower-grid{grid-template-columns:1fr}.brain-panel{grid-column:auto}.lower-grid .center{grid-column:auto}.market-rail{order:2}.brain-panel{order:3}}

/* ===== QLYRA B4 LOGIN POLISH ===== */
.login-screen{
  background:#020912;
}
.login-bg{
  background:
    radial-gradient(circle at 72% 18%,rgba(0,184,255,.22),transparent 0 30%),
    radial-gradient(circle at 28% 80%,rgba(0,92,255,.14),transparent 0 26%),
    linear-gradient(120deg,#020912 0%,#03111f 45%,#041a2d 100%);
}
.ql-watermark{
  bottom:4%;
  font-size:min(23vw,260px);
  font-weight:950;
  letter-spacing:18px;
  color:rgba(40,220,255,.12);
  text-shadow:0 0 24px rgba(56,223,255,.14),0 0 70px rgba(0,127,255,.10);
  transform:scaleX(1.02);
}
.grid-fx{
  opacity:.55;
  background-size:44px 44px;
}
.welcome-panel{
  position:relative;
}
.welcome-panel:before{
  content:"";
  position:absolute;
  width:270px;height:270px;
  left:-70px;top:130px;
  border:1px solid rgba(56,223,255,.12);
  border-radius:50%;
  box-shadow:0 0 50px rgba(56,223,255,.05),inset 0 0 50px rgba(56,223,255,.03);
  pointer-events:none;
}
.welcome-panel:after{
  content:"";
  position:absolute;
  width:170px;height:170px;
  left:-20px;top:180px;
  border:1px dashed rgba(36,160,255,.14);
  border-radius:50%;
  pointer-events:none;
}
.hero-brand .logo,.login .logo{color:#38dfff;text-shadow:0 0 18px rgba(56,223,255,.45)}
.hero-brand b,.login .brand b{color:#dff7ff;text-shadow:0 0 12px rgba(56,223,255,.10)}
.hero-copy h1{
  color:#bfefff;
  text-shadow:0 0 24px rgba(56,223,255,.08);
  font-weight:850;
  letter-spacing:-1.5px;
}
.hero-copy h1::first-line{color:#8be9ff}
.hero-copy p{color:#8fb5ca}
.eyebrow{
  color:#5fe8ff;
  background:rgba(0,174,255,.06);
  border-color:rgba(56,223,255,.42);
  box-shadow:0 0 22px rgba(56,223,255,.06) inset;
}
.hero-chips span{
  color:#b9dff1;
  border-color:rgba(56,223,255,.25);
  background:linear-gradient(180deg,rgba(5,28,44,.72),rgba(3,16,26,.58));
}
.login{
  border-color:rgba(56,223,255,.34);
  background:linear-gradient(180deg,rgba(6,26,42,.94),rgba(3,14,24,.96));
  box-shadow:0 24px 60px rgba(0,0,0,.34),0 0 50px rgba(0,157,255,.06);
}
.login:before{
  content:"";
  display:block;
  height:2px;
  margin:-28px -28px 24px;
  background:linear-gradient(90deg,transparent,#38dfff,transparent);
  opacity:.75;
}
.login h1{
  color:#c8f0ff;
  text-shadow:0 0 18px rgba(56,223,255,.08);
}
.login p,.login .note{color:#87aabd}
.login input{
  background:#03111d;
  border-color:#16496a;
  color:#ccefff;
  box-shadow:inset 0 0 0 1px rgba(56,223,255,.02);
}
.login input::placeholder{color:#6f93a9}
.login input:focus{
  outline:none;
  border-color:#38dfff;
  box-shadow:0 0 0 3px rgba(56,223,255,.08),0 0 22px rgba(56,223,255,.08);
}
.login button{
  background:linear-gradient(90deg,#1167e8 0%,#00b8ff 55%,#1ee5d2 100%);
  box-shadow:0 8px 26px rgba(0,165,255,.16);
}
.login button.secondary{
  background:linear-gradient(180deg,#071a2a,#04111d);
  color:#a8d9ed;
  border:1px solid #16496a;
  box-shadow:none;
}
.login button:hover{filter:brightness(1.05)}
@media(max-width:760px){
  .ql-watermark{font-size:84px;bottom:6%;letter-spacing:6px;color:rgba(40,220,255,.10)}
}

/* ===== QLYRA B5 FINAL LOGIN BALANCE ===== */
.hero-brand{gap:14px;margin-bottom:26px}
.hero-brand .logo{font-size:38px;color:#38dfff;text-shadow:0 0 20px rgba(56,223,255,.50)}
.hero-brand b{font-size:20px;color:#57e7ff!important;letter-spacing:5px;text-shadow:0 0 16px rgba(56,223,255,.22)}
.hero-brand small{font-size:13px;color:#34d9ff}
.login .brand b{color:#57e7ff!important}
.hero-copy h1{font-size:clamp(34px,4vw,60px);line-height:1.05;letter-spacing:-1px;margin:0 0 15px}
.hero-copy h1::first-line{color:#6fe8ff}
@media(max-width:980px){.hero-copy h1{font-size:40px}}


/* ===== QLYRA B6 LOGIN ATMOSPHERE ===== */
.login-bg:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 35% 45%,rgba(56,223,255,.06),transparent 0 22%),radial-gradient(circle at 64% 82%,rgba(56,223,255,.04),transparent 0 20%);pointer-events:none}.ql-watermark{bottom:2.5%;font-size:min(24vw,285px);letter-spacing:16px;color:rgba(64,228,255,.16);text-shadow:0 0 28px rgba(56,223,255,.18),0 0 95px rgba(0,127,255,.14)}.bg-brain{position:absolute;left:9%;top:23%;width:520px;height:420px;opacity:.5;filter:drop-shadow(0 0 16px rgba(56,223,255,.12));transform:perspective(900px) rotateY(18deg) rotateX(10deg);pointer-events:none}.bg-brain .core,.bg-brain .bn{position:absolute;border-radius:50%;border:1px solid rgba(70,228,255,.32);background:radial-gradient(circle,rgba(56,223,255,.18),rgba(56,223,255,.03) 58%,transparent 72%)}.bg-brain .core{left:190px;top:145px;width:110px;height:110px;box-shadow:0 0 45px rgba(56,223,255,.12), inset 0 0 35px rgba(56,223,255,.08)}.bg-brain .bn{width:54px;height:54px}.bg-brain .n1{left:55px;top:84px}.bg-brain .n2{left:346px;top:58px}.bg-brain .n3{left:418px;top:162px}.bg-brain .n4{left:90px;top:270px}.bg-brain .n5{left:325px;top:286px}.bg-brain .n6{left:15px;top:175px}.bg-brain .link{position:absolute;height:1px;background:linear-gradient(90deg,transparent,rgba(72,220,255,.26),transparent);transform-origin:left center}.bg-brain .l1{left:108px;top:112px;width:150px;transform:rotate(19deg)}.bg-brain .l2{left:270px;top:140px;width:126px;transform:rotate(-32deg)}.bg-brain .l3{left:110px;top:280px;width:166px;transform:rotate(-22deg)}.bg-brain .l4{left:244px;top:222px;width:138px;transform:rotate(32deg)}.bg-brain .l5{left:52px;top:204px;width:168px;transform:rotate(-13deg)}.bg-brain .l6{left:255px;top:198px;width:162px;transform:rotate(-6deg)}.hero-copy{position:relative;z-index:2}.welcome-panel{z-index:2}.welcome-panel:before{width:310px;height:310px;left:-88px;top:116px;border-color:rgba(56,223,255,.10)}.welcome-panel:after{width:205px;height:205px;left:-28px;top:173px;border-color:rgba(36,160,255,.18)}@media(max-width:1200px){.bg-brain{left:4%;top:26%;width:420px;height:340px;opacity:.38}}@media(max-width:980px){.bg-brain{display:none}.ql-watermark{font-size:min(26vw,220px)}}
/* ===== QLYRA B7 MASTER — PROJECTS RECOVERY ===== */
.projects-live{min-height:72vh}.project-browser{padding-bottom:24px}.project-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--line)}.no-border{border:0;padding:0;font-size:22px}.project-sub{margin:6px 0 0;color:var(--muted)}.project-grid-live{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;padding:20px}.project-card-live{min-height:112px;background:linear-gradient(145deg,rgba(7,29,46,.92),rgba(3,15,25,.95));border:1px solid #16496a;color:var(--text);display:grid;grid-template-columns:58px 1fr 30px;align-items:center;text-align:left;gap:12px;padding:16px;border-radius:15px;box-shadow:0 10px 30px rgba(0,0,0,.18)}.project-card-live:hover{border-color:var(--cyan);transform:translateY(-1px);box-shadow:0 12px 34px rgba(0,155,255,.09)}.project-card-icon{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;border:1px solid rgba(56,223,255,.34);color:var(--cyan);font-weight:900;background:rgba(56,223,255,.05);box-shadow:inset 0 0 20px rgba(56,223,255,.05)}.project-card-copy{display:flex;flex-direction:column;gap:6px}.project-card-copy b{font-size:18px;color:#c9f3ff}.project-card-copy small{color:var(--muted);line-height:1.35}.project-card-arrow{font-size:20px;color:var(--cyan)}.project-loading{color:var(--muted);padding:22px}.project-back{margin:0 0 12px}.x1-project-shell{display:grid;gap:12px}.project-hero-card{min-height:190px;padding:24px;position:relative;overflow:hidden;background:radial-gradient(circle at 80% 35%,rgba(0,180,255,.14),transparent 0 28%),linear-gradient(135deg,#061522,#03101a 55%,#071c2c)}.project-hero-card:after{content:"QLYRA";position:absolute;right:-10px;bottom:-28px;font-size:110px;font-weight:950;letter-spacing:8px;color:rgba(56,223,255,.055)}.project-hero-copy{position:relative;z-index:2;max-width:70%}.project-kicker{font-size:11px;letter-spacing:2px;color:var(--cyan);font-weight:800}.project-hero-copy h2{font-size:50px;margin:8px 0 2px;color:#bdefff;letter-spacing:-1px}.project-desc{color:var(--muted);max-width:720px}.project-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.project-tags span{padding:7px 10px;border:1px solid var(--line);border-radius:999px;color:#a9d8eb;font-size:12px}.active-project-dot{color:var(--green)!important}.project-hero-mark{position:absolute;right:28px;top:34px;color:rgba(56,223,255,.14);font-size:32px;font-weight:900;letter-spacing:8px}.project-tabs{display:flex;gap:8px;flex-wrap:wrap}.project-tabs button{background:var(--card2);border:1px solid var(--line);color:var(--text)}.project-tabs button span{color:var(--cyan);margin-left:5px}.project-detail-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(260px,.75fr);gap:12px}.project-main-col,.project-side-col{display:grid;gap:12px;align-content:start}.master-content{padding:20px;color:#b8d5e5;line-height:1.55}.master-content h3{margin:0 0 12px;color:#d8f6ff}.memory-body{white-space:normal}.decision-list-live{padding:8px 12px 16px}.decision-item-live{display:flex;justify-content:space-between;gap:16px;padding:13px 8px;border-bottom:1px solid var(--line)}.decision-item-live div{display:flex;flex-direction:column;gap:5px}.decision-item-live b{color:#c9f3ff}.decision-item-live small{color:var(--muted);line-height:1.35;max-width:760px}.decision-item-live>span{align-self:flex-start;padding:5px 8px;border-radius:999px;border:1px solid rgba(30,229,164,.35);color:var(--green);font-size:10px;font-weight:800}.decision-empty{padding:18px;color:var(--muted)}.project-info-rows p{display:flex;justify-content:space-between;margin:0;padding:12px 14px;border-top:1px solid var(--line);color:var(--muted)}.project-info-rows b{color:#bfefff}.project-progress{height:10px;margin:22px 18px 8px;background:#03101a;border:1px solid var(--line);border-radius:999px;overflow:hidden}.project-progress span{display:block;height:100%;width:65%;background:linear-gradient(90deg,#147cff,#00b7ff,#1ee5d2);box-shadow:0 0 20px rgba(56,223,255,.3)}.project-progress-text{padding:0 18px 20px;color:var(--cyan);font-size:24px;font-weight:900}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px}.quick-actions button{text-align:left}.login input:invalid{border-color:#16496a}@media(max-width:1000px){.project-detail-grid{grid-template-columns:1fr}.project-hero-copy{max-width:100%}.project-hero-mark{display:none}}@media(max-width:620px){.project-grid-live{grid-template-columns:1fr}.project-topbar{align-items:flex-start;flex-direction:column}.project-hero-copy h2{font-size:38px}.quick-actions{grid-template-columns:1fr}}


/* ===== QLYRA B8 — MARKET CORE DESKTOP FIT ===== */
@media (min-width: 1200px) {
  html, body {height: 100%; overflow: hidden;}
  #app {height: 100vh; overflow: hidden;}
  header {min-height: 62px; padding: 8px 14px; gap: 10px;}
  header .brand {min-width: 205px;}
  .search {padding: 10px 12px; font-size: 14px;}
  .theme-switch button, .role-pill, #logoutBtn {font-size: 11px; padding: 8px 10px;}
  .layout {height: calc(100vh - 62px); min-height: 0; grid-template-columns: 182px 1fr;}
  aside {padding: 8px 10px; overflow: hidden;}
  .nav {margin: 2px 0; padding: 9px 10px; font-size: 13px;}
  main {padding: 10px; height: 100%; overflow: hidden;}
  .view#dashboard {height: 100%; overflow: hidden;}

  .trader-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 236px minmax(0,1fr) 294px;
    grid-template-rows: minmax(0,1fr) 170px;
    grid-template-areas:
      "markets main brain"
      "markets lower brain";
    gap: 10px;
  }
  .market-rail {grid-area: markets; min-height: 0; display: flex; flex-direction: column;}
  .trader-main {grid-area: main; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) 150px; gap: 10px;}
  .brain-panel {grid-area: brain; min-height: 0; display: flex; flex-direction: column;}
  .lower-grid {grid-area: lower; min-height: 0; margin-top: 0; display: grid; grid-template-columns: 1.08fr 1.08fr .92fr; gap: 10px;}

  .card {min-height: 0;}
  .title {padding: 10px 12px; font-size: 15px;}
  .title span {font-size: 12px;}

  .market-tabs {gap: 5px; padding: 9px 10px 6px;}
  .market-tabs button {padding: 6px 8px; font-size: 12px;}
  .market-search {padding: 0 10px 8px;}
  .market-list {padding: 0 8px 8px; gap: 7px; overflow: auto; min-height: 0;}
  .market-item {padding: 9px 10px; border-radius: 10px;}
  .market-item b {font-size: 14px;}
  .market-item small, .market-item em {font-size: 12px;}

  .trading-card {display: flex; flex-direction: column; min-height: 0;}
  .ticker-strip {padding: 8px 12px; gap: 10px; font-size: 13px;}
  .toolbar {padding: 7px 10px; gap: 5px;}
  .toolbar button {padding: 5px 8px; font-size: 12px;}
  .price {padding: 10px 12px; font-size: 22px;}
  .fakechart {flex: 1; min-height: 0; height: auto; margin: 0 12px; background-size: auto;}
  .chips {padding: 8px 10px 10px; gap: 6px;}
  .chips i {padding: 5px 7px; font-size: 12px;}

  .trader-bottom {grid-template-columns: 1.05fr .95fr; gap: 10px; min-height: 0;}
  .positions-card, .news-card {min-height: 0;}
  .position-row {padding: 10px 12px; gap: 10px;}
  .position-row b {font-size: 13px;}
  .position-row small {font-size: 12px; margin-top: 3px;}
  .news-card p {margin: 0; padding: 7px 12px; font-size: 13px;}
  .news-card .secondary {margin: 8px 12px 12px; font-size: 12px; padding: 8px 10px;}

  .brain-panel .title {flex: 0 0 auto;}
  .brain-top {grid-template-columns: 104px 1fr; gap: 8px; padding: 10px;}
  .score.compact {font-size: 34px;}
  .score.compact small {font-size: 12px;}
  .consensus-box {gap: 6px;}
  .consensus-box p {padding: 8px 10px; font-size: 12px;}
  .rows p {padding: 9px 12px; font-size: 13px;}
  .brain-quote {margin: 10px; padding: 10px; font-size: 12px; line-height: 1.35;}
  .ai-budget {margin: 10px; padding: 8px 10px; font-size: 12px;}
  .brain-mini {margin: 10px; height: 120px; flex: 1; min-height: 120px;}
  .mini-node {width: 52px; height: 52px; font-size: 12px;}
  .mini-node.core {width: 68px; height: 68px;}

  .lower-grid .card {display: flex; flex-direction: column; min-height: 0;}
  .lower-grid .list, .lower-grid .brain, .lower-grid .center {min-height: 0;}
  .lower-grid .list p {padding: 9px 12px; font-size: 13px;}
  .lower-grid .brain {height: 100%; min-height: 0;}
  .lower-grid .brain span {width: 72px; height: 72px; font-size: 16px;}
  .lower-grid .brain i {width: 48px; height: 48px; font-size: 12px;}
  .center {padding-bottom: 10px;}
  .mic {font-size: 38px; margin: 10px 0 6px;}
  .center p {margin: 0 12px 10px; font-size: 13px; line-height: 1.3;}
  .center .ask-ai, .voice-float button {font-size: 12px; padding: 10px 12px; min-width: 0;}
  .voice-float {right: 14px; bottom: 14px;}
}

@media (min-width: 1200px) and (max-height: 900px) {
  .trader-shell {grid-template-rows: minmax(0,1fr) 148px; grid-template-columns: 224px minmax(0,1fr) 280px;}
  .position-row, .rows p, .lower-grid .list p {padding-top: 8px; padding-bottom: 8px;}
  .market-item {padding-top: 8px; padding-bottom: 8px;}
  .brain-mini {height: 108px; min-height: 108px;}
}


/* ===== QLYRA B9 — ONE SCREEN MARKET DESKTOP ===== */
@media (min-width:1200px){
  header{min-height:58px;height:58px;padding:7px 12px;background:linear-gradient(180deg,#03101a,#020c14);box-shadow:0 8px 26px rgba(0,0,0,.18)}
  header .brand{min-width:188px;gap:9px}
  header .brand .logo{font-size:27px}
  header .brand b{font-size:13px;letter-spacing:3.2px}
  header .brand small{font-size:10px}
  header .search{max-width:460px;height:36px;padding:8px 11px;font-size:12px}
  .layout{height:calc(100vh - 58px);grid-template-columns:166px minmax(0,1fr)}
  aside{padding:7px 8px;background:linear-gradient(180deg,#03131f,#020b12 72%)}
  .nav{padding:8px 9px;margin:1px 0;font-size:12px;border-radius:9px}
  .nav.active{box-shadow:inset 3px 0 #38dfff,0 0 20px rgba(56,223,255,.07)}
  main{padding:8px;height:100%;overflow:hidden}
  .view#dashboard{height:100%;overflow:hidden}

  .trader-shell{
    height:100%;
    display:grid;
    grid-template-columns:218px minmax(0,1fr) 276px;
    grid-template-rows:minmax(0,1fr) 152px;
    grid-template-areas:"markets main brain" "markets lower brain";
    gap:8px;
  }
  .market-rail{grid-area:markets;display:flex;flex-direction:column;min-height:0}
  .trader-main{grid-area:main;display:grid;grid-template-rows:minmax(0,1fr) 128px;gap:8px;min-height:0}
  .brain-panel{grid-area:brain;display:flex;flex-direction:column;min-height:0}
  .lower-grid{grid-area:lower;display:grid;grid-template-columns:1.05fr 1.05fr .9fr;gap:8px;margin:0;min-height:0}

  .card{border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.015)}
  .title{padding:8px 10px;font-size:13px;line-height:1.15}
  .title span{font-size:10px}

  .market-tabs{padding:7px 8px 5px;gap:4px}
  .market-tabs button{font-size:10.5px;padding:5px 7px;border-radius:8px}
  .market-search{padding:0 8px 6px}
  .market-search .search{height:32px;padding:7px 9px;font-size:11px}
  .market-list{padding:0 7px 7px;gap:5px;overflow:auto;scrollbar-width:thin}
  .market-item{padding:7px 8px;border-radius:9px}
  .market-item b{font-size:12px}.market-item small,.market-item em{font-size:10.5px}

  .trading-card{min-height:0}
  .ticker-strip{padding:6px 10px;gap:9px;font-size:11px}
  .toolbar{padding:5px 8px;gap:4px}
  .toolbar button{padding:4px 7px;font-size:10px;border-radius:7px}
  .price{padding:7px 10px 4px;font-size:20px}
  .fakechart{flex:1;min-height:0;margin:0 10px;background-size:auto;opacity:.94}
  .chips{padding:6px 8px 7px;gap:4px}
  .chips i{padding:4px 6px;font-size:10px;border-radius:7px}

  .trader-bottom{grid-template-columns:1.08fr .92fr;gap:8px;min-height:0}
  .positions-card,.news-card{min-height:0;overflow:hidden}
  .position-row{padding:7px 10px;gap:8px}
  .position-row b{font-size:11.5px}.position-row small{font-size:9.5px;margin-top:2px}
  .news-card p{padding:5px 10px;font-size:10.5px;margin:0}
  .news-card .secondary{margin:5px 10px 8px;padding:6px 8px;font-size:9.5px}

  .brain-top{grid-template-columns:90px 1fr;padding:8px;gap:6px}
  .score.compact{font-size:29px;padding:6px 0;border-radius:11px}
  .score.compact small{font-size:9.5px}
  .consensus-box{gap:4px}
  .consensus-box p{padding:6px 7px;font-size:9.5px;border-radius:9px}
  .rows p{padding:7px 9px;font-size:10.5px}
  .brain-quote{margin:7px;padding:8px;font-size:10px;line-height:1.3}
  .ai-budget{margin:7px;padding:7px 8px;font-size:10px}
  .brain-mini{margin:7px;height:auto;min-height:0;flex:1;border-radius:11px}
  .mini-node{width:44px;height:44px;font-size:9.5px}.mini-node.core{width:58px;height:58px;font-size:10px}

  .lower-grid .card{min-height:0;overflow:hidden}
  .lower-grid .list p{padding:6px 9px;font-size:10.5px}
  .lower-grid .brain{height:100%;min-height:0;transform:scale(.86);transform-origin:center}
  .lower-grid .brain span{width:62px;height:62px;font-size:13px}
  .lower-grid .brain i{width:42px;height:42px;font-size:10px}
  .lower-grid .center{padding-bottom:5px}
  .lower-grid .mic{font-size:28px;margin:5px 0 2px}
  .lower-grid .center p{font-size:9.5px;margin:0 8px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .lower-grid .center .ask-ai{padding:6px 9px;font-size:9.5px}

  .voice-float{right:10px;bottom:9px}.voice-float button{padding:8px 10px;font-size:10px;box-shadow:0 7px 24px rgba(0,0,0,.25)}
}

@media (min-width:1200px) and (max-height:820px){
  .trader-shell{grid-template-rows:minmax(0,1fr) 136px;grid-template-columns:208px minmax(0,1fr) 264px}
  .trader-main{grid-template-rows:minmax(0,1fr) 116px}
  .market-item{padding-top:6px;padding-bottom:6px}
  .position-row{padding-top:6px;padding-bottom:6px}
  .brain-quote{display:none}
}
\n\n/* ===== QLYRA B10 — TRADING TERMINAL + SINGLE 3D BRAIN ===== */
:root{--red:#ff4f6d;--cyan2:#00bde8;--panel:#061522;--panel2:#03101a}
.demo-badge{display:inline-flex;align-items:center;padding:2px 6px;border:1px solid rgba(56,223,255,.28);border-radius:999px;color:#69dff8;font-size:9px;letter-spacing:.8px;font-weight:800}
.terminal-grid{height:100%;min-height:0;display:grid;grid-template-columns:200px minmax(420px,1fr) 215px 248px;grid-template-rows:minmax(0,1fr) 148px;grid-template-areas:"markets chart book trade" "markets positions positions trade";gap:8px}
.market-dock{grid-area:markets;display:flex;flex-direction:column;min-height:0;overflow:hidden}.terminal-title{display:flex;align-items:center;justify-content:space-between}.compact-tabs{padding:7px 8px 5px}.compact-tabs button{font-size:10px;padding:5px 7px}.market-head{display:grid;grid-template-columns:1fr auto;padding:5px 11px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.8px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.terminal-market-list{overflow:auto;gap:5px;padding-top:6px}.terminal-market-list .market-item{width:100%;background:rgba(255,255,255,.012);color:var(--text);text-align:left;border:1px solid var(--line);padding:8px 9px}.terminal-market-list .market-item.active{background:linear-gradient(90deg,rgba(20,124,255,.14),rgba(0,189,232,.05));border-color:#178ad0}.terminal-market-list .market-item em{color:var(--green)}
.chart-terminal{grid-area:chart;display:flex;flex-direction:column;min-height:0;overflow:hidden}.pair-strip{min-height:52px;display:flex;align-items:center;gap:16px;padding:7px 10px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,rgba(10,33,52,.65),rgba(3,16,26,.4))}.pair-name{min-width:142px;display:flex;flex-direction:column}.pair-name b{font-size:15px}.pair-name small,.pair-stat small{font-size:9px;color:var(--muted)}.pair-stat{display:flex;flex-direction:column;gap:2px}.pair-stat b{font-size:12px}.brain-launch{margin-left:auto;background:linear-gradient(90deg,#0c5fbf,#00bde8);border:1px solid rgba(56,223,255,.35);color:white;padding:7px 10px;font-size:10px}.chart-tabs-row{display:flex;align-items:center;gap:8px;padding:5px 8px;border-bottom:1px solid var(--line)}.chart-tabs{display:flex;gap:3px}.chart-tabs button,.terminal-tools button{background:transparent;color:var(--muted);border:1px solid transparent;padding:5px 7px;font-size:10px}.chart-tabs button.active-tool,.terminal-tools button.active-tool{color:var(--text);border-color:#1e739e;background:rgba(56,223,255,.06)}.terminal-tools{margin-left:auto;padding:0}.chart-legend{display:flex;gap:10px;padding:4px 10px;font-size:9px;color:var(--muted)}.price-chart{position:relative;flex:1;min-height:0;background:linear-gradient(180deg,#04111b,#020a11)}.price-chart>div:not(.chart-fallback){height:100%!important}.chart-fallback{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:12px}.chart-fallback.hidden{display:none}
.orderbook-panel{grid-area:book;display:flex;flex-direction:column;min-height:0;overflow:hidden}.book-head{display:grid;grid-template-columns:1.1fr .85fr .85fr;gap:5px;padding:5px 8px;font-size:9px;color:var(--muted);border-bottom:1px solid var(--line)}.book-rows{display:flex;flex-direction:column;min-height:0}.book-row{position:relative;display:grid;grid-template-columns:1.1fr .85fr .85fr;gap:5px;padding:4px 8px;font-size:9px;line-height:1.1}.book-row:before{content:"";position:absolute;right:0;top:1px;bottom:1px;width:var(--depth);opacity:.12;z-index:0}.asks .book-row:before{background:var(--red)}.bids .book-row:before{background:var(--green)}.book-row span{position:relative;z-index:1}.asks .book-row span:first-child{color:#ff7187}.bids .book-row span:first-child{color:#38e6ae}.book-mid{padding:7px 8px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.book-mid b{color:var(--green);font-size:14px}.book-mid small{font-size:9px;color:var(--muted)}.book-balance{margin-top:auto;display:grid;grid-template-columns:41fr 59fr;font-size:9px;font-weight:800}.book-balance span{padding:5px 7px}.buy-balance{background:rgba(30,229,164,.15);color:#50e8b7}.sell-balance{background:rgba(255,79,109,.14);color:#ff768c;text-align:right}
.trade-panel{grid-area:trade;padding:9px;display:flex;flex-direction:column;gap:8px;min-height:0;overflow:hidden}.trade-tabs,.order-type-tabs,.trade-select-row,.quick-size,.trade-actions{display:grid;gap:5px}.trade-tabs{grid-template-columns:1fr 1fr}.trade-tabs button,.order-type-tabs button,.quick-size button{background:transparent;color:var(--muted);border:1px solid var(--line);font-size:10px;padding:6px}.trade-tabs .active-tool,.order-type-tabs .active-tool{color:#fff;background:rgba(56,223,255,.08);border-color:#1681b4}.trade-select-row{grid-template-columns:1fr 1fr}.trade-select{background:#081a29;border:1px solid var(--line);color:var(--text);padding:7px 8px;font-size:10px;text-align:left}.order-type-tabs{grid-template-columns:1fr 1fr 1fr}.available-row{display:flex;justify-content:space-between;color:var(--muted);font-size:9px}.available-row b{color:var(--text)}.trade-field{display:grid;gap:4px}.trade-field span,.risk-grid span{font-size:9px;color:var(--muted)}.trade-field input,.risk-grid input{width:100%;background:#071725;border:1px solid var(--line);border-radius:8px;color:var(--text);padding:8px;font-size:11px}.quick-size{grid-template-columns:repeat(4,1fr)}.risk-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.risk-grid label{display:grid;gap:4px}.ai-approval{padding:8px;border:1px solid rgba(56,223,255,.18);border-radius:9px;background:linear-gradient(90deg,rgba(56,223,255,.05),rgba(92,73,255,.04));display:flex;justify-content:space-between;gap:6px;font-size:9px}.ai-approval span{color:var(--cyan)}.ai-approval b{color:#b9d6e6;text-align:right}.trade-actions{grid-template-columns:1fr 1fr}.trade-actions button{padding:10px;font-size:11px}.long-btn{background:linear-gradient(90deg,#0d9f73,#1bd5a0)}.short-btn{background:linear-gradient(90deg,#bd354d,#ff536f)}.authorize-btn{background:linear-gradient(90deg,#1b62c8,#00bde8);font-size:10px;padding:9px}.trade-note{font-size:8.5px;color:var(--muted);line-height:1.3;margin-top:auto;text-align:center}
.positions-terminal{grid-area:positions;min-height:0;overflow:hidden}.positions-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);padding:5px 7px}.positions-tabs button{background:transparent;color:var(--muted);border:1px solid transparent;padding:5px 8px;font-size:10px}.positions-tabs .active-tool{color:var(--text);border-bottom-color:var(--cyan)}.positions-tabs span{color:var(--cyan)}.positions-table{font-size:9.5px}.position-head,.position-line{display:grid;grid-template-columns:1.1fr 1fr .8fr .8fr 1.2fr .65fr;align-items:center;gap:7px;padding:5px 9px}.position-head{color:var(--muted);font-size:8.5px;text-transform:uppercase;letter-spacing:.5px}.position-line{border-top:1px solid rgba(18,58,89,.7)}.mini-action{background:#071725;border:1px solid var(--line);color:#b8d8e8;padding:4px 6px;font-size:9px}.positive{color:var(--green)!important}

.brain-full-view{height:100%;min-height:0;overflow:hidden}.brain-workspace{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 270px;grid-template-rows:auto minmax(0,1fr);grid-template-areas:"head head" "stage inspect";gap:8px}.brain-workspace-head{grid-area:head;display:flex;align-items:center;justify-content:space-between;padding:10px 14px}.brain-workspace-head h2{margin:2px 0;font-size:20px;color:#c5f4ff}.brain-workspace-head p{margin:0;color:var(--muted);font-size:10px}.brain-eyebrow{font-size:9px;letter-spacing:1.6px;color:var(--cyan);font-weight:800}.brain-controls{display:flex;gap:6px}.brain-controls button{font-size:10px;padding:7px 9px}.brain-viewport-card{grid-area:stage;position:relative;overflow:hidden;min-height:0;background:radial-gradient(circle at center,rgba(0,166,255,.09),transparent 0 38%),linear-gradient(180deg,#020b13,#030f19)}.brain-3d-stage{position:absolute;inset:0}.brain-fallback{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#c0e6f3;text-align:center}.brain-fallback.hidden{display:none}.brain-fallback small{color:var(--muted);max-width:360px}.fallback-orb{width:92px;height:92px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--cyan);font-size:28px;font-weight:900;color:var(--cyan);box-shadow:0 0 45px rgba(56,223,255,.18),inset 0 0 40px rgba(56,223,255,.08)}.brain-hud{position:absolute;left:10px;right:10px;bottom:9px;display:flex;gap:10px;pointer-events:none}.brain-hud span{padding:5px 7px;border:1px solid rgba(56,223,255,.18);border-radius:7px;background:rgba(2,9,18,.68);backdrop-filter:blur(6px);font-size:8px;color:var(--muted)}.brain-hud span:first-child{color:var(--green)}.brain-hud b{color:#bfefff}.brain-inspector{grid-area:inspect;padding-bottom:12px;overflow:auto}.brain-node-icon{width:76px;height:76px;margin:18px auto 10px;border-radius:50%;display:grid;place-items:center;color:var(--cyan);font-size:20px;font-weight:900;border:1px solid var(--cyan);box-shadow:0 0 32px rgba(56,223,255,.12);background:radial-gradient(circle,rgba(56,223,255,.1),transparent)}.brain-inspector h3{text-align:center;margin:0 10px 7px;color:#c9f5ff}.brain-inspector>p{padding:0 15px;color:var(--muted);font-size:10px;line-height:1.45}.brain-metrics{margin:14px 10px;border:1px solid var(--line);border-radius:10px;overflow:hidden}.brain-metrics p{margin:0;padding:8px 9px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:9px}.brain-metrics p:first-child{border-top:0}.brain-metrics span{color:var(--muted)}.brain-metrics b{color:#bfefff}.brain-inspector-note{margin:10px;padding:10px;border:1px solid rgba(56,223,255,.16);border-radius:9px;color:#91b5c8;font-size:9px;line-height:1.4;background:rgba(56,223,255,.03)}
.qlyra-toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%) translateY(20px);opacity:0;pointer-events:none;z-index:1000;padding:9px 13px;border-radius:10px;border:1px solid var(--line);background:rgba(3,16,26,.95);color:#c8edf7;font-size:11px;transition:.2s;box-shadow:0 12px 40px rgba(0,0,0,.35)}.qlyra-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:1350px) and (min-width:1000px){.terminal-grid{grid-template-columns:178px minmax(360px,1fr) 190px 220px}.pair-strip{gap:9px}.pair-name{min-width:120px}.pair-stat:nth-of-type(4){display:none}}
@media(max-height:820px) and (min-width:1000px){.terminal-grid{grid-template-rows:minmax(0,1fr) 132px}.pair-strip{min-height:46px}.positions-table{font-size:9px}.trade-panel{gap:6px}.brain-workspace-head{padding-top:7px;padding-bottom:7px}}
@media(max-width:999px){.terminal-grid{height:auto;display:grid;grid-template-columns:1fr;grid-template-areas:"chart" "trade" "book" "positions" "markets"}.market-dock,.trade-panel,.orderbook-panel,.positions-terminal,.chart-terminal{min-height:260px}.brain-workspace{height:auto;grid-template-columns:1fr;grid-template-rows:auto 520px auto;grid-template-areas:"head" "stage" "inspect"}.brain-workspace-head{align-items:flex-start;gap:10px;flex-direction:column}.brain-controls{flex-wrap:wrap}}


/* ===== QLYRA B11 — REAL BRAIN + MINI BRAIN ===== */
.mini-brain-widget{margin-top:4px;padding:0;min-height:142px;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(56,223,255,.28);border-radius:12px;background:radial-gradient(circle at 50% 45%,rgba(0,178,255,.13),transparent 42%),linear-gradient(180deg,#041725,#020b13);color:var(--text);position:relative;text-align:left;box-shadow:inset 0 0 28px rgba(0,174,255,.04)}
.mini-brain-widget:before{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle at 17% 22%,rgba(255,255,255,.55) 0 1px,transparent 1.5px),radial-gradient(circle at 76% 16%,rgba(83,225,255,.55) 0 1px,transparent 1.5px),radial-gradient(circle at 88% 72%,rgba(255,255,255,.38) 0 1px,transparent 1.4px),radial-gradient(circle at 28% 78%,rgba(87,189,255,.38) 0 1px,transparent 1.4px);background-size:90px 70px,120px 90px,140px 120px,100px 85px;opacity:.55}
.mini-brain-top{height:27px;padding:6px 8px;display:flex;justify-content:space-between;align-items:center;position:relative;z-index:2;border-bottom:1px solid rgba(56,223,255,.13)}
.mini-brain-top b{font-size:9px;letter-spacing:1.2px;color:#bcefff}.mini-brain-top em{font-size:8px;font-style:normal;color:var(--green);border:1px solid rgba(30,229,164,.25);padding:2px 5px;border-radius:999px}
.mini-brain-stage{height:91px;position:relative;display:block;z-index:1;overflow:hidden;cursor:pointer}.mini-brain-stage>div,.mini-brain-stage>canvas{position:absolute!important;inset:0!important}
.mini-brain-fallback{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:42px;height:42px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--cyan);color:var(--cyan);font-style:normal;font-size:13px;font-weight:900;box-shadow:0 0 25px rgba(56,223,255,.22)}
.mini-brain-open{height:24px;padding:5px 8px;font-size:8px;color:#8eb5c8;text-align:center;border-top:1px solid rgba(56,223,255,.12);position:relative;z-index:2;background:rgba(2,9,18,.58)}
.mini-brain-widget:hover{border-color:rgba(56,223,255,.62);box-shadow:0 0 22px rgba(56,223,255,.08),inset 0 0 28px rgba(0,174,255,.05)}

.brain-viewport-card{background:radial-gradient(ellipse at 50% 48%,rgba(0,151,255,.18),transparent 0 31%),radial-gradient(circle at 24% 20%,rgba(36,88,200,.11),transparent 0 25%),radial-gradient(circle at 82% 72%,rgba(0,255,214,.075),transparent 0 26%),linear-gradient(180deg,#010711,#020b15 48%,#020912)!important;box-shadow:inset 0 0 90px rgba(0,0,0,.5),0 0 0 1px rgba(44,193,255,.025)}
.brain-viewport-card:before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background-image:radial-gradient(circle at 10% 12%,rgba(255,255,255,.75) 0 .7px,transparent 1.2px),radial-gradient(circle at 63% 8%,rgba(90,220,255,.7) 0 .8px,transparent 1.4px),radial-gradient(circle at 32% 69%,rgba(255,255,255,.48) 0 .7px,transparent 1.2px),radial-gradient(circle at 82% 44%,rgba(94,181,255,.55) 0 .8px,transparent 1.4px),radial-gradient(circle at 72% 88%,rgba(255,255,255,.46) 0 .7px,transparent 1.2px);background-size:115px 92px,170px 130px,150px 120px,210px 160px,130px 105px;opacity:.42}
.brain-viewport-card:after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(rgba(56,223,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(56,223,255,.022) 1px,transparent 1px);background-size:48px 48px;mask-image:radial-gradient(ellipse at center,black 0 55%,transparent 82%);opacity:.55;transform:perspective(650px) rotateX(62deg) scale(1.4);transform-origin:center 78%}
.brain-3d-stage{z-index:2}.brain-3d-stage canvas{filter:saturate(1.16) contrast(1.08)}
.brain-space-layer{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}.brain-space-layer span{position:absolute;border-radius:50%;filter:blur(42px);opacity:.23;animation:brainNebula 12s ease-in-out infinite alternate}.brain-space-layer span:nth-child(1){width:280px;height:280px;left:7%;top:14%;background:rgba(0,125,255,.22)}.brain-space-layer span:nth-child(2){width:340px;height:340px;right:12%;top:24%;background:rgba(0,255,220,.10);animation-delay:-4s}.brain-space-layer span:nth-child(3){width:240px;height:240px;left:42%;bottom:4%;background:rgba(102,75,255,.13);animation-delay:-8s}@keyframes brainNebula{from{transform:translate3d(-12px,-8px,0) scale(.96)}to{transform:translate3d(16px,12px,0) scale(1.08)}}
.brain-hud{z-index:4}.brain-fallback{z-index:5}.brain-node-icon{background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.18),rgba(56,223,255,.09) 35%,rgba(2,11,19,.4) 70%);box-shadow:0 0 38px rgba(56,223,255,.18),inset 0 0 26px rgba(56,223,255,.08)}
.brain-inspector{background:linear-gradient(180deg,rgba(7,25,39,.94),rgba(2,11,19,.96));box-shadow:inset 0 0 48px rgba(0,157,255,.035)}
@media (prefers-reduced-motion:reduce){.brain-space-layer span{animation:none}}
@media(max-height:820px) and (min-width:1000px){.mini-brain-widget{min-height:118px}.mini-brain-stage{height:70px}}


/* ===== QLYRA B12 SELF-CONTAINED NEURAL CANVAS ===== */
.qlyra-neural-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:3;touch-action:none;cursor:grab}.mini-brain-stage .qlyra-neural-canvas{pointer-events:none;cursor:pointer}.brain-viewport-card{background:radial-gradient(ellipse at 50% 44%,rgba(0,148,216,.16),transparent 0 32%),radial-gradient(circle at 22% 18%,rgba(69,75,210,.12),transparent 0 24%),radial-gradient(circle at 82% 68%,rgba(0,235,205,.08),transparent 0 24%),linear-gradient(180deg,#010711,#020b15 52%,#020912)!important}.brain-viewport-card:before{opacity:.62!important}.brain-viewport-card:after{opacity:.72!important}.brain-fallback{background:radial-gradient(circle at center,rgba(0,151,255,.07),transparent 0 38%)}


/* ===== QLYRA B13 — IMMERSIVE NEURAL SPACE ===== */
@media (min-width:1000px){
  .brain-workspace{grid-template-columns:minmax(0,1fr) 218px;grid-template-rows:58px minmax(0,1fr);gap:6px}
  .brain-workspace-head{padding:7px 11px;border-radius:12px}
  .brain-workspace-head h2{font-size:19px;margin:1px 0}.brain-workspace-head p{font-size:9px}
  .brain-controls button{padding:6px 8px;font-size:9px}
  .brain-inspector{border-radius:12px}
  .brain-node-icon{width:62px;height:62px;margin:12px auto 8px;font-size:17px}
  .brain-inspector h3{font-size:15px}.brain-inspector>p{font-size:9px;padding:0 12px}
  .brain-metrics{margin:10px 8px}.brain-metrics p{padding:7px 8px;font-size:8.5px}
  .brain-inspector-note{margin:8px;padding:8px;font-size:8.5px}
}
.brain-viewport-card{border-color:rgba(56,223,255,.28)!important;background:radial-gradient(ellipse at 50% 43%,rgba(0,189,232,.18),transparent 0 27%),radial-gradient(circle at 19% 18%,rgba(47,74,255,.16),transparent 0 24%),radial-gradient(circle at 83% 63%,rgba(0,255,204,.10),transparent 0 28%),radial-gradient(circle at 51% 54%,rgba(0,76,132,.10),transparent 0 43%),linear-gradient(180deg,#00040c,#010914 48%,#010611)!important;box-shadow:inset 0 0 125px rgba(0,0,0,.68),inset 0 -80px 120px rgba(0,25,72,.12),0 0 0 1px rgba(44,193,255,.025)}
.brain-viewport-card:before{background-image:radial-gradient(circle at 7% 9%,rgba(255,255,255,.9) 0 .75px,transparent 1.3px),radial-gradient(circle at 61% 7%,rgba(90,220,255,.82) 0 .8px,transparent 1.45px),radial-gradient(circle at 31% 67%,rgba(255,255,255,.55) 0 .75px,transparent 1.3px),radial-gradient(circle at 84% 43%,rgba(94,181,255,.68) 0 .85px,transparent 1.45px),radial-gradient(circle at 72% 89%,rgba(255,255,255,.55) 0 .75px,transparent 1.3px),radial-gradient(circle at 45% 31%,rgba(75,223,255,.5) 0 .65px,transparent 1.2px)!important;background-size:94px 78px,145px 108px,132px 104px,176px 138px,112px 89px,206px 155px!important;opacity:.72!important;animation:qlyraStarDrift 22s linear infinite}
.brain-viewport-card:after{background:linear-gradient(rgba(56,223,255,.034) 1px,transparent 1px),linear-gradient(90deg,rgba(56,223,255,.03) 1px,transparent 1px),radial-gradient(ellipse at 50% 80%,rgba(0,145,255,.09),transparent 58%)!important;background-size:42px 42px,42px 42px,100% 100%!important;opacity:.78!important}
.brain-space-layer span{opacity:.34;filter:blur(54px);animation-duration:9s}.brain-space-layer span:nth-child(1){width:390px;height:390px;background:rgba(0,118,255,.24)}.brain-space-layer span:nth-child(2){width:420px;height:420px;background:rgba(0,255,214,.12)}.brain-space-layer span:nth-child(3){width:360px;height:360px;background:rgba(113,74,255,.16)}
.brain-hud{left:8px;right:8px;bottom:7px}.brain-hud span{background:rgba(1,8,18,.58);border-color:rgba(56,223,255,.24);font-size:7.5px}
.qlyra-neural-canvas{filter:saturate(1.26) contrast(1.08) drop-shadow(0 0 5px rgba(0,210,255,.08))}
@keyframes qlyraStarDrift{from{background-position:0 0,0 0,0 0,0 0,0 0,0 0}to{background-position:0 -78px,0 -108px,0 -104px,0 -138px,0 -89px,0 -155px}}
@media (prefers-reduced-motion:reduce){.brain-viewport-card:before{animation:none!important}}

/* ===== QLYRA B15 — TRADER FUNCTIONS ===== */
.market-hidden{display:none!important}
.active-size{border-color:var(--cyan)!important;color:var(--cyan)!important;background:rgba(56,223,255,.08)!important}
.gate-message{font-size:10px;line-height:1.35;color:var(--muted);padding:7px 9px;border:1px solid rgba(28,84,117,.65);border-radius:8px;background:rgba(3,18,29,.58)}
.ai-approval.gate-ready{border-color:rgba(30,229,164,.58);box-shadow:inset 0 0 20px rgba(30,229,164,.06)}
.ai-approval.gate-ready b{color:var(--green)}
.ai-approval.gate-warning{border-color:rgba(255,95,122,.55)}
.ai-approval.gate-warning b{color:#ff7890}
.trade-field.hidden{display:none!important}
.brain-context{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 9px;border:1px solid rgba(56,223,255,.24);border-radius:8px;background:linear-gradient(90deg,rgba(56,223,255,.055),rgba(5,22,35,.3));font-size:10px}
.brain-context span{color:var(--muted);text-transform:uppercase;letter-spacing:.8px}
.brain-context b{color:#bdefff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.position-panel{min-height:0;overflow:auto}
.empty-panel{display:grid;place-items:center;min-height:76px;color:var(--muted);font-size:11px}
.asset-summary{display:grid;grid-template-columns:1fr auto 1fr auto;gap:12px;align-items:center;padding:16px;color:var(--muted);font-size:11px}
.asset-summary b{color:#c8f3ff;font-size:13px}
.demo-order{display:grid;grid-template-columns:minmax(0,1fr) 110px 80px;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line);font-size:11px}
.demo-order>div{display:flex;flex-direction:column;gap:3px}.demo-order small{color:var(--muted)}
.cancel-demo-order{padding:6px 8px;font-size:10px;background:rgba(255,79,109,.08);border:1px solid rgba(255,79,109,.25);color:#ff8298}
.history-entry{display:grid;grid-template-columns:70px 1fr;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line);font-size:11px}.history-entry span{color:var(--muted)}.history-entry b{color:#c4eaf8}
.demo-added{animation:qlyraRowFlash .7s ease-out}
@keyframes qlyraRowFlash{0%{background:rgba(56,223,255,.14)}100%{background:transparent}}
.brain-to-trader{width:calc(100% - 24px);margin:12px;padding:10px 12px;background:linear-gradient(90deg,#147cff,#00b7ff);font-size:11px}
@media(max-width:1100px){.asset-summary{grid-template-columns:1fr auto}.demo-order{grid-template-columns:1fr auto}.demo-order>span{display:none}}

/* ===== QLYRA B16 — TRADER CONTROL FUNCTIONS ===== */
.market-tail{display:flex;align-items:center;gap:7px;margin-left:auto}.fav-star{font-style:normal;color:#7a9db2;font-size:12px;line-height:1;padding:2px 0;min-width:13px;text-align:center}.market-item[data-favorite="true"] .fav-star{color:#ffd15c;text-shadow:0 0 10px rgba(255,209,92,.2)}.market-item .market-tail em{margin:0}.market-item:focus-visible .fav-star{outline:1px solid var(--cyan);border-radius:3px}
.position-manager{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:rgba(0,4,10,.66);backdrop-filter:blur(6px);padding:18px}.position-manager-card{width:min(620px,94vw);padding:0;overflow:hidden;border-color:rgba(56,223,255,.34);box-shadow:0 30px 100px rgba(0,0,0,.58),0 0 38px rgba(0,172,255,.08)}.pm-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,rgba(56,223,255,.055),transparent)}.pm-head span{font-size:9px;letter-spacing:1.5px;color:var(--cyan);font-weight:800}.pm-head h3{margin:3px 0 0;font-size:18px}.pm-head button{padding:7px 9px}.pm-meta{display:flex;gap:10px;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid var(--line)}.pm-meta span{padding:7px 9px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:11px}.pm-meta b{color:#c9f3ff}.pm-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;padding:16px}.pm-grid label{display:grid;gap:6px;color:var(--muted);font-size:10px}.pm-grid input{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--card2);color:var(--text);padding:10px}.pm-actions{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:8px;padding:0 16px 12px}.pm-actions button{font-size:11px}.danger-action{background:linear-gradient(90deg,#a42a45,#ef4567);color:white}.position-manager-card>small{display:block;padding:0 16px 15px;color:var(--muted);font-size:9px}.position-line .manage-position{min-width:68px}.trade-tabs button{transition:.15s}.trade-tabs button.active-tool{box-shadow:inset 0 0 18px rgba(56,223,255,.06)}
@media(max-width:720px){.pm-grid{grid-template-columns:1fr}.pm-actions{grid-template-columns:1fr}.position-manager{padding:10px}}

/* ===== QLYRA B17 — DIGITAL TERMINAL REBALANCE ===== */
:root{--violet:#7b61ff;--aqua:#25f2e1;--blue:#1a8cff;--panel-glow:rgba(29,186,255,.12)}
header .brand b,.hero-brand b,.login .brand b{color:#7cecff!important;text-shadow:0 0 14px rgba(56,223,255,.20)}
header .brand .logo,.hero-brand .logo,.login .brand .logo{background:linear-gradient(145deg,#73f5ff,#2d9cff 55%,#8f6cff);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none}
header{background:linear-gradient(90deg,#020b13 0%,#041a29 45%,#061321 100%)!important;border-bottom-color:#155270!important}
header:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,transparent,#23e7ff 28%,#7768ff 62%,transparent);opacity:.45}

@media (min-width:1200px){
  .layout{grid-template-columns:150px minmax(0,1fr)!important}
  aside{background:linear-gradient(180deg,#031521 0%,#020a12 72%,#061221 100%)!important;border-right:1px solid rgba(33,190,235,.14)}
  .nav{font-size:11px!important;padding:8px 8px!important}
  .nav.active{background:linear-gradient(90deg,rgba(23,150,255,.19),rgba(41,229,255,.05))!important;border-color:#1f9fdb!important;box-shadow:inset 3px 0 #3be8ff,0 0 22px rgba(28,170,255,.08)!important}

  .terminal-grid{
    grid-template-columns:184px minmax(570px,1fr) 188px 222px!important;
    grid-template-rows:minmax(0,1fr) 132px!important;
    gap:7px!important;
  }
  .card{border-color:#124762!important;background:linear-gradient(180deg,rgba(7,27,43,.96),rgba(2,11,19,.98))!important;box-shadow:0 10px 28px rgba(0,0,0,.18),inset 0 1px 0 rgba(91,225,255,.025)!important}
  .card:hover{border-color:#185977}

  .market-dock{background:radial-gradient(circle at 50% 8%,rgba(25,148,255,.08),transparent 34%),linear-gradient(180deg,#061927,#020b13 82%)!important}
  .terminal-title{font-size:13px!important;letter-spacing:.15px}
  .demo-badge{background:linear-gradient(90deg,rgba(24,236,210,.10),rgba(44,151,255,.09));border:1px solid rgba(44,224,255,.28);color:#49efd9!important;border-radius:999px;padding:3px 6px}
  .compact-tabs{padding:6px 7px 4px!important}.compact-tabs button{font-size:9px!important;padding:5px 6px!important}
  .market-search{padding:0 7px 5px!important}.market-search input{height:30px!important;padding:6px 8px!important;font-size:10px!important}
  .market-head{padding:4px 8px!important}
  .terminal-market-list{max-height:48%;min-height:150px;overflow:auto!important;padding:5px 7px 6px!important;gap:4px!important}
  .terminal-market-list .market-item{padding:7px 8px!important;border-radius:9px!important;background:linear-gradient(90deg,rgba(255,255,255,.012),rgba(31,110,157,.02))!important}
  .terminal-market-list .market-item.active{box-shadow:0 0 18px rgba(21,177,255,.07),inset 0 0 22px rgba(19,116,255,.05)}

  .market-pulse{margin-top:auto;border-top:1px solid rgba(44,186,225,.20);padding:8px;background:radial-gradient(circle at 50% 100%,rgba(92,72,255,.08),transparent 62%)}
  .market-pulse-head{display:flex;justify-content:space-between;align-items:center;font-size:8px;letter-spacing:.8px;color:#7dbbd2;margin-bottom:7px}
  .market-pulse-head b{font-size:7px;color:#42e6cf;border:1px solid rgba(42,224,197,.25);border-radius:999px;padding:2px 5px}
  .pulse-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px}
  .pulse-grid div{padding:6px;border:1px solid rgba(37,149,196,.18);border-radius:8px;background:linear-gradient(145deg,rgba(10,40,62,.7),rgba(4,16,27,.82))}
  .pulse-grid small{display:block;color:#648ea4;font-size:7px;text-transform:uppercase}.pulse-grid strong{display:block;color:#89efff;font-size:10px;margin-top:2px}.pulse-grid div:nth-child(1) strong,.pulse-grid div:nth-child(3) strong{color:#42e6b5}
  .sector-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;margin-top:6px}.sector-strip span{text-align:center;padding:4px 2px;font-size:7px;border-radius:6px;background:rgba(50,136,180,.06);border:1px solid rgba(58,181,225,.15);color:#7fb8ce}

  .chart-terminal{border-color:#165778!important;box-shadow:0 0 30px rgba(15,143,216,.05),inset 0 0 50px rgba(0,153,255,.015)!important}
  .pair-strip{min-height:46px!important;height:46px;gap:12px!important;padding:5px 9px!important;background:linear-gradient(90deg,rgba(6,31,49,.96),rgba(7,26,46,.78) 55%,rgba(20,21,52,.42))!important}
  .pair-identity{display:flex;align-items:center;gap:7px;min-width:136px}
  .pair-icon{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#ffc75e,#f49b22 55%,#9b5d00);color:#07131c;font-weight:900;box-shadow:0 0 13px rgba(255,174,40,.20)}
  .pair-name{min-width:0!important}.pair-name b{font-size:13px!important;color:#dff8ff}.pair-name small{font-size:7px!important;letter-spacing:.5px}
  .pair-metrics{display:flex;align-items:stretch;gap:4px;min-width:0;flex:1}
  .pair-stat{min-width:70px;padding:4px 8px;border-left:1px solid rgba(48,143,182,.16);gap:1px!important}.pair-stat small{font-size:7px!important;letter-spacing:.4px}.pair-stat b{font-size:10px!important}.primary-stat b{color:#7deaff;font-size:12px!important}
  .brain-launch{padding:7px 10px!important;background:linear-gradient(90deg,#1665d7,#00b9dc 70%,#6b60ff)!important;box-shadow:0 0 18px rgba(31,188,255,.09)}
  .chart-tabs-row{padding:4px 7px!important}.chart-tabs button,.terminal-tools button{font-size:9px!important;padding:4px 6px!important}.chart-legend{padding:3px 8px!important;font-size:8px!important}
  .price-chart{background:radial-gradient(circle at 72% 34%,rgba(10,117,165,.045),transparent 32%),linear-gradient(180deg,#03111b,#020910)!important}

  .orderbook-panel{background:linear-gradient(180deg,#061725,#020b13)!important}
  .book-row{font-size:8.5px!important;padding:3px 7px!important}.book-head{font-size:8px!important}.book-mid{padding:6px 7px!important}.book-mid b{font-size:13px!important}

  .trade-panel{gap:6px!important;padding:8px!important;background:radial-gradient(circle at 50% 64%,rgba(87,69,255,.05),transparent 34%),linear-gradient(180deg,#061725,#020b13)!important}
  .trade-tabs button,.order-type-tabs button,.quick-size button,.trade-select{font-size:9px!important;padding:5px 6px!important}
  .trade-field input,.risk-grid input{padding:7px!important;font-size:10px!important}.trade-actions button{padding:9px!important}.authorize-btn{padding:8px!important}
  .mini-brain-widget{min-height:108px!important;margin-top:2px!important;background:radial-gradient(circle at 50% 48%,rgba(0,184,255,.16),transparent 48%),linear-gradient(180deg,#051728,#020a12)!important}
  .mini-brain-stage{height:62px!important}.mini-brain-top{padding:6px 7px 2px!important}.mini-brain-open{font-size:8px!important;padding:3px 6px 5px!important}
  .brain-context{font-size:8px!important;padding:6px 7px!important}.trade-note{font-size:7px!important}

  .positions-terminal{background:linear-gradient(180deg,rgba(6,25,40,.95),rgba(2,10,18,.98))!important}.positions-tabs{padding:4px 6px!important}.positions-tabs button{padding:4px 6px!important;font-size:9px!important}.position-head,.position-line{padding:4px 8px!important;font-size:8.5px!important}.position-head{font-size:7.5px!important}
}

@media (min-width:1450px){
  .terminal-grid{grid-template-columns:188px minmax(660px,1fr) 194px 228px!important}
}

/* ===== QLYRA B18 — LIVE READ-ONLY MARKET FEED ===== */
.demo-badge.live-ok,.market-pulse-head .live-ok{color:#7fffd4!important;border-color:rgba(30,229,164,.55)!important;background:rgba(30,229,164,.08)!important;box-shadow:0 0 16px rgba(30,229,164,.12)}
.demo-badge.live-pending,.market-pulse-head .live-pending{color:#74dfff!important;border-color:rgba(56,223,255,.45)!important;background:rgba(56,223,255,.07)!important}
.demo-badge.live-error,.market-pulse-head .live-error{color:#ff9aae!important;border-color:rgba(255,79,109,.46)!important;background:rgba(255,79,109,.07)!important}
#pairFeedLabel{letter-spacing:.08em}
#marketSourceStatus[data-state="live"]{color:#7fc6df}
#marketSourceStatus[data-state="error"]{color:#ff9aae}
.market-tail em.negative,.pair-stat.negative b{color:#ff6580!important}
.book-balance{display:flex;overflow:hidden}.book-balance>span{transition:width .25s ease}

/* ===== QLYRA B21 — TRADINGVIEW REAL-TIME CHART ===== */
.tv-chart-shell{position:relative;min-height:0;overflow:hidden;background:#020b12}
.qlyra-tv-widget{position:absolute;inset:0;width:100%;height:100%;min-height:0;background:#020b12}
.qlyra-tv-widget>.tradingview-widget-container__widget{width:100%;height:100%;min-height:0}
.qlyra-tv-widget iframe{display:block!important;width:100%!important;height:100%!important;min-height:100%!important;border:0!important}
.qlyra-tv-widget .chart-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#79a8bf;background:linear-gradient(180deg,#03111b,#020a11);font-size:12px;z-index:0}
.qlyra-tv-widget.tv-loaded .chart-fallback{display:none}
.chart-legend{min-height:26px}
.chart-legend span:first-child{color:#9aefff;font-weight:800;letter-spacing:.04em}
@media(min-width:1200px){.chart-terminal{grid-template-rows:auto auto auto minmax(0,1fr)}.tv-chart-shell{height:auto!important;min-height:0!important}}


/* ===== QLYRA B22 — CLEAN ORDERED TIMEFRAMES ===== */
.timeframe-toolbar{display:flex!important;align-items:center;gap:4px!important;flex-wrap:nowrap!important}
.timeframe-toolbar .timeframe-label{font-size:9px;font-weight:900;letter-spacing:1.4px;color:#55dff5;opacity:.8;margin-right:2px}
.timeframe-toolbar button[data-tv-interval]{min-width:32px;padding:5px 7px!important;text-align:center}
.timeframe-toolbar .timeframe-divider{width:1px;height:18px;background:rgba(56,223,255,.2);margin:0 3px}
.timeframe-toolbar .indicator-shortcut,.timeframe-toolbar .chart-settings{opacity:.82}
@media(max-width:1250px){.timeframe-toolbar button[data-tv-interval]{min-width:28px;padding:5px 5px!important}.timeframe-toolbar{gap:2px!important}}

/* ===== QLYRA B23 — WIDER LIVE CHART + FUNCTIONAL CHART TABS ===== */
@media (min-width:1200px){
  .layout{grid-template-columns:126px minmax(0,1fr)!important}
  .terminal-grid{
    grid-template-columns:158px minmax(760px,1fr) 170px 204px!important;
    grid-template-rows:minmax(0,1fr) 108px!important;
    gap:6px!important;
  }
  .market-dock{min-width:0!important}
  .chart-terminal{min-width:0!important}
  .pair-strip{min-height:45px!important;padding:5px 8px!important;gap:8px!important}
  .pair-identity{min-width:128px!important}
  .pair-metrics{gap:12px!important}
  .chart-tabs-row{min-height:31px!important;padding:3px 7px!important}
  .chart-legend{min-height:20px!important;padding:3px 8px!important}
  .positions-terminal{min-height:0!important}
  .positions-table{font-size:8.5px!important}
  .position-line,.position-head{padding-top:5px!important;padding-bottom:5px!important}
  .trade-panel{padding-bottom:4px!important}
  .mini-brain-widget{margin-top:2px!important}
}
@media (min-width:1450px){
  .terminal-grid{grid-template-columns:164px minmax(830px,1fr) 174px 208px!important}
}
.chart-tabs button{cursor:pointer}
.timeframe-toolbar button{cursor:pointer}
.indicator-shortcut{cursor:pointer}
.qlyra-tv-widget,.qlyra-tv-widget>.tradingview-widget-container__widget,.qlyra-tv-widget iframe{width:100%!important;height:100%!important}
.qlyra-tv-widget{overflow:hidden}
#demoPrice{transition:color .12s ease,text-shadow .12s ease}
#demoPrice.live-tick-flash{animation:qlyraLiveTick .34s ease-out}
@keyframes qlyraLiveTick{
  0%{color:#effcff;text-shadow:0 0 16px rgba(56,223,255,.95)}
  100%{color:inherit;text-shadow:none}
}
#chartFeedBadge.live-ok{box-shadow:0 0 12px rgba(30,229,164,.16)}
.chart-tabs button.active-tool,.timeframe-toolbar button.active-tool,#emaToggle.active-tool{
  color:#dffaff!important;border-color:#24bfe9!important;background:linear-gradient(180deg,rgba(31,156,211,.20),rgba(11,75,108,.16))!important;
  box-shadow:inset 0 0 18px rgba(56,223,255,.04),0 0 10px rgba(56,223,255,.05)
}

/* ===== QLYRA B25 — NATIVE FAST CHART ===== */
.qlyra-fast-chart{position:absolute;inset:0;width:100%;height:100%;background:#020b12}
.qlyra-fast-chart canvas{display:block}
.qlyra-fast-watermark{position:absolute;left:12px;bottom:10px;z-index:5;font-size:9px;letter-spacing:1.3px;color:rgba(104,210,235,.45);pointer-events:none}
#chartFeedBadge.fast-live{color:#36efbf;border-color:rgba(54,239,191,.45);box-shadow:0 0 14px rgba(54,239,191,.14)}
#chartFeedBadge.fast-sync{color:#7ddfff;border-color:rgba(56,223,255,.38)}
#chartFeedBadge.fast-fallback{color:#ffbe64;border-color:rgba(255,190,100,.38)}

/* ===== QLYRA B26 — LIVE MARKETS EXPLORER ===== */
.markets-live-view{height:100%;overflow:hidden}
.markets-live-shell{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:8px;min-height:0}
.markets-live-main{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-height:0;overflow:hidden;background:linear-gradient(180deg,rgba(5,24,38,.98),rgba(2,10,18,.99))}
.markets-live-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);background:radial-gradient(circle at 72% 0,rgba(33,132,255,.08),transparent 35%)}
.market-live-kicker{font-size:8px;letter-spacing:1.8px;color:var(--cyan);font-weight:900}.markets-live-head h2{font-size:22px;margin:2px 0;color:#cdf5ff}.markets-live-head p{font-size:10px;color:var(--muted);margin:0}.markets-live-status{display:flex;align-items:center;gap:8px}.markets-live-status b{font-size:9px;color:#76a9bf;font-weight:700}
.markets-live-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}
.markets-filter-tabs{display:flex;gap:5px;flex-wrap:wrap}.markets-filter-tabs button{padding:6px 9px;font-size:9px;background:#041421;border:1px solid #16445e;color:#8fb7c9;border-radius:8px}.markets-page-search{max-width:230px!important;height:30px!important;font-size:10px!important;padding:6px 9px!important}
.markets-live-table-wrap{min-height:0;overflow:hidden;display:grid;grid-template-rows:28px minmax(0,1fr)}
.markets-live-table-head,.markets-live-row{display:grid;grid-template-columns:minmax(150px,1.25fr) .9fr .7fr 1fr .8fr 1fr 70px;gap:8px;align-items:center}
.markets-live-table-head{padding:0 12px;font-size:8px;letter-spacing:.75px;text-transform:uppercase;color:#638fa6;border-bottom:1px solid rgba(56,223,255,.12)}
.markets-live-rows{overflow:auto;min-height:0}.markets-live-row{min-height:42px;padding:6px 12px;border-bottom:1px solid rgba(43,115,151,.12);font-size:10px;color:#9dc7d9;cursor:pointer;transition:background .12s ease,border-color .12s ease}.markets-live-row:hover,.markets-live-row.selected{background:linear-gradient(90deg,rgba(24,135,191,.08),rgba(75,73,200,.035));border-color:rgba(56,223,255,.24)}
.markets-pair{display:grid;grid-template-columns:22px auto;grid-template-rows:auto auto;column-gap:7px}.markets-pair .market-star{grid-row:1/3;width:22px;height:22px;padding:0;align-self:center;border-radius:7px;background:rgba(255,177,59,.04);border:1px solid rgba(255,177,59,.16);color:#5e6871;font-size:11px}.markets-pair .market-star.on{color:#ffc04d;border-color:rgba(255,192,77,.42);box-shadow:0 0 12px rgba(255,177,59,.08)}.markets-pair b{font-size:11px;color:#d5f5ff}.markets-pair small{font-size:8px;color:#627f91}.markets-price{font-weight:800;color:#d8f7ff}.markets-loading{padding:24px;color:var(--muted);font-size:11px}
.markets-selected-card{min-height:0;display:flex;flex-direction:column;background:radial-gradient(circle at 50% 22%,rgba(0,189,232,.09),transparent 36%),linear-gradient(180deg,#061827,#020b13)}.market-focus-symbol{display:flex;align-items:center;gap:8px;padding:12px}.market-focus-symbol b{display:block;color:#d9f8ff;font-size:13px}.market-focus-symbol small{display:block;color:var(--muted);font-size:8px}.market-focus-price{font-size:27px;font-weight:900;color:#7ff7df;padding:2px 12px 12px}.market-focus-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:0 10px}.market-focus-grid p{margin:0;padding:8px;border:1px solid rgba(44,128,164,.18);border-radius:8px;background:rgba(3,17,28,.65)}.market-focus-grid span{display:block;font-size:7px;text-transform:uppercase;color:#678da1}.market-focus-grid b{display:block;font-size:10px;color:#bcecff;margin-top:2px}.markets-selected-card .brain-launch{margin:10px}.market-focus-note{padding:0 10px;color:#648597;font-size:8px;line-height:1.35}
@media(max-width:1150px){.markets-live-shell{grid-template-columns:1fr}.markets-selected-card{display:none}.markets-live-table-head,.markets-live-row{grid-template-columns:minmax(130px,1.2fr) .85fr .65fr .9fr .75fr .9fr 60px}}

/* ===== QLYRA B27 — SMOOTH TICK + LIVE RADAR / SMART MONEY ===== */
.qlyra-live-module-view{height:100%;overflow:hidden}
.qlyra-module-shell{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 238px;gap:8px;min-height:0}
.qlyra-module-main{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-height:0;overflow:hidden;background:linear-gradient(180deg,rgba(5,24,38,.98),rgba(2,10,18,.99));box-shadow:inset 0 0 60px rgba(23,106,186,.035)}
.qlyra-module-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line);background:radial-gradient(circle at 72% 0,rgba(95,73,255,.10),transparent 36%),radial-gradient(circle at 14% 0,rgba(32,216,255,.06),transparent 30%)}
.qlyra-module-head h2{font-size:22px;margin:2px 0;color:#cdf5ff}.qlyra-module-head p{font-size:10px;color:var(--muted);margin:0}.qlyra-module-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}
.qlyra-live-table-wrap{min-height:0;overflow:hidden;display:grid;grid-template-rows:28px minmax(0,1fr)}
.qlyra-live-rows{overflow:auto;min-height:0}.radar-table-head,.radar-live-row,.smart-table-head,.smart-live-row{display:grid;grid-template-columns:minmax(120px,1.15fr) .55fr .65fr .9fr .75fr .9fr .85fr 62px;gap:8px;align-items:center}.radar-table-head,.smart-table-head{padding:0 12px;font-size:8px;letter-spacing:.75px;text-transform:uppercase;color:#638fa6;border-bottom:1px solid rgba(56,223,255,.12)}
.radar-live-row,.smart-live-row{min-height:42px;padding:6px 12px;border-bottom:1px solid rgba(43,115,151,.12);font-size:10px;color:#9dc7d9;cursor:pointer;transition:background .12s ease,border-color .12s ease}.radar-live-row:hover,.radar-live-row.selected,.smart-live-row:hover{background:linear-gradient(90deg,rgba(24,135,191,.08),rgba(75,73,200,.035));border-color:rgba(56,223,255,.24)}
.radar-live-row b,.smart-live-row b{color:#d6f5ff}.radar-score{font-size:14px;font-weight:900;color:#39e5ff}.radar-score.hot{color:#1ee5a4}.radar-score.warn{color:#ffb13b}.radar-score.down{color:#ff6680}.radar-signal{font-size:9px;font-weight:800;letter-spacing:.4px}.radar-signal.up{color:#1ee5a4}.radar-signal.down{color:#ff6680}.radar-signal.watch{color:#ffb13b}
.qlyra-module-side{min-height:0;overflow:auto;background:linear-gradient(180deg,rgba(5,24,38,.98),rgba(2,10,18,.99))}.radar-focus-score{width:110px;height:110px;margin:16px auto 10px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(56,223,255,.35);background:radial-gradient(circle,rgba(44,190,255,.14),rgba(3,15,25,.78));box-shadow:0 0 32px rgba(40,192,255,.12),inset 0 0 22px rgba(56,223,255,.05)}.radar-focus-score span{font-size:32px;font-weight:950;color:#67e9ff}.radar-focus-score small{font-size:8px;color:#7aa8bc;margin-top:-28px}.qlyra-module-side h3{text-align:center;color:#d8f7ff;font-size:18px;margin:4px 0}.radar-focus-signal{text-align:center;margin:0 12px 10px;color:#8eb9ca;font-size:11px;line-height:1.35}.smart-summary{padding:10px}.smart-summary p{display:flex;justify-content:space-between;gap:12px;margin:0;padding:11px 6px;border-bottom:1px solid rgba(56,223,255,.11);font-size:10px;color:#7fa9ba}.smart-summary b{color:#d7f4ff;text-align:right}
@media(max-width:1150px){.qlyra-module-shell{grid-template-columns:1fr}.qlyra-module-side{display:none}.radar-table-head,.radar-live-row,.smart-table-head,.smart-live-row{grid-template-columns:minmax(110px,1.15fr) .55fr .65fr .85fr .75fr .85fr .75fr 58px}}

/* ===== QLYRA B28 — NEWS / JOURNAL / VOICE CORE ===== */
.qlyra-work-view{height:100%;overflow:hidden}.qlyra-work-shell{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:10px}.qlyra-work-main,.qlyra-work-side,.journal-main,.journal-editor,.voice-stage-card,.voice-side-card{min-height:0;overflow:hidden}.qlyra-work-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:14px 16px;border-bottom:1px solid var(--line)}.qlyra-work-head h2{margin:2px 0 3px;color:#d5f5ff;font-size:22px}.qlyra-work-head p{margin:0;color:var(--muted);font-size:12px}.news-center-shell .qlyra-module-controls{padding:10px 12px}.news-feed{height:calc(100% - 118px);overflow:auto;padding:0 10px 12px;display:grid;align-content:start;gap:8px}.news-item{display:grid;grid-template-columns:92px minmax(0,1fr) 90px;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(145deg,rgba(8,28,43,.88),rgba(3,14,24,.9));cursor:pointer}.news-item:hover,.news-item.selected{border-color:rgba(56,223,255,.5);box-shadow:0 0 22px rgba(56,223,255,.06)}.news-meta{display:flex;flex-direction:column;gap:4px}.news-meta b{font-size:11px;color:var(--cyan)}.news-meta small{font-size:10px;color:var(--muted)}.news-copy b{display:block;color:#d9f7ff;font-size:13px;margin-bottom:4px}.news-copy p{margin:0;color:#8eb1c4;font-size:11px;line-height:1.35}.news-tags{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}.news-tags span,.news-source-pill{font-size:9px;padding:5px 7px;border-radius:999px;border:1px solid var(--line);color:#8edff7;background:rgba(56,223,255,.05)}.news-brief-panel{display:flex;flex-direction:column}.news-brief-metrics{display:grid;grid-template-columns:1fr;gap:7px;padding:12px}.news-brief-metrics p,.journal-stats p{display:flex;justify-content:space-between;margin:0;padding:9px 10px;border:1px solid var(--line);border-radius:10px;color:var(--muted);font-size:11px}.news-brief-metrics b,.journal-stats b{color:#ccf4ff}.news-selected-card{padding:12px;margin:0 12px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(6,23,35,.78)}.news-selected-card h3{font-size:16px;margin:10px 0 8px;color:#d8f6ff}.news-selected-card p{font-size:11px;line-height:1.45;color:#91afbf}.news-actions{display:grid;gap:8px;padding:0 12px 12px}.news-actions button{width:100%}
.journal-shell{grid-template-columns:minmax(0,1fr) 330px}.journal-filter-row{display:flex;gap:7px;padding:10px 12px;border-bottom:1px solid var(--line)}.journal-filter-row button{padding:7px 10px}.journal-filter-row .search{margin-left:auto;max-width:280px}.journal-entries{height:calc(100% - 116px);overflow:auto;padding:10px;display:grid;gap:8px;align-content:start}.journal-entry{border:1px solid var(--line);border-radius:12px;padding:11px;background:linear-gradient(145deg,rgba(8,26,40,.85),rgba(3,13,22,.92));display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.journal-entry h4{margin:0 0 5px;color:#d6f6ff;font-size:14px}.journal-entry p{margin:0;color:#8dacbd;font-size:11px;line-height:1.35}.journal-entry-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.journal-entry-meta span{font-size:9px;border:1px solid var(--line);border-radius:999px;padding:4px 6px;color:#8edff7}.journal-entry-actions{display:flex;gap:5px;align-items:start}.journal-editor{display:flex;flex-direction:column}.journal-form{padding:12px;display:grid;gap:9px}.journal-form label,.journal-form-grid label,.voice-settings label{display:grid;gap:5px;color:var(--muted);font-size:10px}.journal-form input,.journal-form select,.journal-form textarea,.voice-settings select{width:100%;background:#03121e;border:1px solid var(--line);color:#c9efff;border-radius:9px;padding:9px}.journal-form textarea{min-height:92px;resize:vertical}.journal-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.journal-stats{display:grid;gap:6px;padding:0 12px 12px;margin-top:auto}
.voice-copilot-shell{height:100%;display:grid;grid-template-columns:minmax(0,1.5fr) 360px;gap:10px}.voice-stage-card{position:relative;overflow:hidden;background:radial-gradient(circle at 50% 48%,rgba(0,173,255,.15),transparent 0 22%),linear-gradient(155deg,#041522,#020a12)}.voice-stage-card:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(42,172,219,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(42,172,219,.045) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,transparent,#000 18%,#000 85%,transparent);pointer-events:none}.voice-orb-wrap{position:relative;z-index:1;height:calc(100% - 205px);display:flex;flex-direction:column;align-items:center;justify-content:center}.voice-orb{width:150px;height:150px;border-radius:50%;border:1px solid rgba(56,223,255,.55);background:radial-gradient(circle at 35% 30%,rgba(147,245,255,.28),rgba(0,139,214,.11) 32%,rgba(2,14,27,.92) 70%);box-shadow:0 0 60px rgba(23,192,255,.18),inset 0 0 38px rgba(31,214,255,.08);position:relative;color:#5fe8ff;cursor:pointer}.voice-orb.listening{animation:voicePulse 1s infinite alternate;box-shadow:0 0 90px rgba(23,192,255,.35),inset 0 0 48px rgba(31,214,255,.14)}.voice-orb-core{font-weight:950;font-size:31px}.voice-orb i{position:absolute;inset:-12px;border:1px solid rgba(56,223,255,.13);border-radius:50%;animation:voiceRing 6s linear infinite}.voice-orb i:nth-child(2){inset:-28px;animation-duration:9s}.voice-orb i:nth-child(3){inset:-45px;animation-duration:13s}@keyframes voicePulse{to{transform:scale(1.04)}}@keyframes voiceRing{to{transform:rotate(360deg)}}.voice-orb-wrap h3{margin:30px 0 8px;color:#d8f7ff}.voice-orb-wrap p{margin:0;color:#7f9eaf;font-size:12px}.voice-transcript{position:relative;z-index:1;margin:0 16px 10px;border:1px solid var(--line);border-radius:12px;padding:10px;background:rgba(2,12,21,.72)}.voice-transcript span{font-size:9px;color:var(--cyan);letter-spacing:1.5px}.voice-transcript div{font-size:13px;color:#ccefff;margin-top:5px;min-height:20px}.voice-quick{position:relative;z-index:1;display:flex;gap:7px;flex-wrap:wrap;padding:0 16px 14px}.voice-quick button{font-size:10px;padding:7px 9px}.voice-side-card{display:flex;flex-direction:column}.voice-conversation{flex:1;overflow:auto;padding:10px;display:grid;align-content:start;gap:8px}.voice-msg{display:grid;gap:4px;max-width:92%;padding:9px 10px;border-radius:11px;border:1px solid var(--line);font-size:11px}.voice-msg.ai{background:rgba(33,189,255,.06)}.voice-msg.user{margin-left:auto;background:rgba(98,115,255,.08)}.voice-msg b{font-size:9px;color:var(--cyan)}.voice-msg span{color:#b7d2df;line-height:1.35}.voice-settings{padding:10px;border-top:1px solid var(--line);display:grid;gap:9px}.voice-toggle{grid-template-columns:1fr auto!important;align-items:center}.voice-toggle input{width:auto}
@media(max-width:1100px){.qlyra-work-shell,.journal-shell,.voice-copilot-shell{grid-template-columns:1fr}.qlyra-work-side,.journal-editor,.voice-side-card{display:none}}

/* ===== QLYRA B29 — TOP METRICS LAYOUT STABILITY ===== */
/* Prevent BTC price ticks from pushing/shifting the metric boxes beside it. */
.pair-strip{display:flex;align-items:center;min-width:0}
.pair-identity{flex:0 0 136px;min-width:136px;max-width:136px}
.pair-metrics{
  display:grid!important;
  grid-template-columns:112px 82px 92px 116px;
  align-items:stretch;
  gap:6px!important;
  flex:0 0 auto!important;
  min-width:0;
}
.pair-stat{
  width:100%;
  min-width:0!important;
  max-width:none;
  overflow:hidden;
  white-space:nowrap;
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1,"lnum" 1;
}
.pair-stat b{
  display:block;
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1,"lnum" 1;
}
#demoPrice{display:inline-block;min-width:96px;max-width:96px;text-align:left}
#activeChange{display:inline-block;min-width:66px}
#activeFunding{display:inline-block;min-width:76px}
#activeOi{display:inline-block;min-width:96px}
.brain-launch{margin-left:auto!important;flex:0 0 auto}

@media (max-width:1450px) and (min-width:1200px){
  .pair-identity{flex-basis:124px;min-width:124px;max-width:124px}
  .pair-metrics{grid-template-columns:104px 74px 84px 104px;gap:4px!important}
  #demoPrice{min-width:88px;max-width:88px}
}

/* ===== QLYRA B30 — VOICE COPILOT PHASE 2 ===== */
.voice-context-chip{margin-top:12px;padding:7px 11px;border:1px solid rgba(56,223,255,.24);border-radius:999px;background:rgba(56,223,255,.06);color:#8feaff;font-size:10px;font-weight:800;letter-spacing:.5px;box-shadow:inset 0 0 18px rgba(56,223,255,.03)}
.voice-orb-wrap{height:calc(100% - 220px)}
.voice-msg.system{background:rgba(255,183,74,.05);border-color:rgba(255,183,74,.2)}
.voice-msg.system b{color:#ffc46a}
.voice-float button.voice-live{box-shadow:0 0 0 1px rgba(56,223,255,.28),0 10px 30px rgba(0,0,0,.28),0 0 28px rgba(56,223,255,.12)}

/* ===== QLYRA B31 — SECURITY + EXCHANGE CONNECTIONS ===== */
.qlyra-security-view{height:100%;overflow:hidden}.security-shell{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:9px;min-height:0}.security-main{min-height:0;overflow:auto;background:linear-gradient(180deg,rgba(5,24,38,.98),rgba(2,10,18,.99))}.security-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid var(--line);background:radial-gradient(circle at 78% 0,rgba(44,179,255,.08),transparent 33%)}.security-head h2{font-size:22px;margin:2px 0 3px;color:#d7f6ff}.security-head p{margin:0;color:var(--muted);font-size:11px}.security-head-actions{display:flex;gap:8px;align-items:center}.security-safe{color:#7ff7df;border-color:rgba(30,229,164,.38);background:rgba(30,229,164,.06)}
.security-section{margin:10px;border:1px solid var(--line);border-radius:12px;background:rgba(3,16,27,.72);overflow:hidden}.security-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid rgba(56,223,255,.11)}.security-section-head b{display:block;color:#d3f4ff;font-size:12px}.security-section-head small{display:block;color:#698ca0;font-size:9px;margin-top:2px}.exchange-connection-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;padding:10px}.exchange-card{border:1px solid rgba(56,223,255,.16);border-radius:11px;background:linear-gradient(145deg,rgba(7,28,43,.88),rgba(2,13,22,.94));padding:10px;min-width:0}.exchange-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.exchange-brand{display:flex;align-items:center;gap:8px;min-width:0}.exchange-logo{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;font-weight:950;font-size:10px;color:#bff7ff;background:radial-gradient(circle,rgba(56,223,255,.14),rgba(4,20,31,.9));border:1px solid rgba(56,223,255,.22)}.exchange-brand b{display:block;color:#d6f5ff;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.exchange-brand small{display:block;color:#688da0;font-size:8px;margin-top:2px}.connection-state{font-size:8px;font-weight:900;padding:4px 6px;border-radius:999px;border:1px solid rgba(255,190,100,.24);color:#ffc06a;background:rgba(255,190,100,.05)}.connection-state.live{border-color:rgba(30,229,164,.3);color:#5ff0c7;background:rgba(30,229,164,.06)}.exchange-card-metrics{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:10px 0}.exchange-card-metrics p{margin:0;padding:7px;border:1px solid rgba(56,223,255,.1);border-radius:8px}.exchange-card-metrics span{display:block;font-size:7px;color:#65899c;text-transform:uppercase}.exchange-card-metrics b{display:block;font-size:9px;color:#bdeaf7;margin-top:2px}.exchange-card-actions{display:flex;gap:6px}.exchange-card-actions button{flex:1;font-size:8px;padding:6px 7px}.security-two-col{display:grid;grid-template-columns:1fr 1fr;gap:0}.security-policy-pill{font-size:8px;color:#85ddf6;border:1px solid rgba(56,223,255,.23);border-radius:999px;padding:5px 7px;background:rgba(56,223,255,.05)}.security-rule-list{display:grid}.security-rule-list>div{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 11px;border-bottom:1px solid rgba(56,223,255,.08)}.security-rule-list>div:last-child{border-bottom:0}.security-rule-list p{margin:0}.security-rule-list p b{display:block;color:#cdeefa;font-size:10px}.security-rule-list p small{display:block;color:#6f92a4;font-size:8px;margin-top:2px}.security-rule-list em{font-style:normal;font-size:8px;font-weight:900;color:#7edff7}.rule-dot{width:8px;height:8px;border-radius:50%;box-shadow:0 0 10px currentColor}.rule-dot.ok{color:#1ee5a4;background:#1ee5a4}.rule-dot.warn{color:#ffb13b;background:#ffb13b}.rule-dot.stop{color:#ff5c78;background:#ff5c78}.execution-gate-state{display:flex;align-items:center;gap:10px;padding:16px 14px}.execution-gate-state>span{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(56,223,255,.28);color:#71e8ff;background:rgba(56,223,255,.06);font-size:22px}.execution-gate-state b{display:block;color:#d6f5ff;font-size:13px}.execution-gate-state small{display:block;color:#7293a5;font-size:9px;line-height:1.35;margin-top:3px}.security-gate-actions{display:flex;gap:7px;padding:0 12px 12px}.security-gate-actions button{flex:1}.security-audit-log{max-height:170px;overflow:auto}.security-audit-row{display:grid;grid-template-columns:80px 92px minmax(0,1fr);gap:8px;align-items:center;padding:8px 11px;border-bottom:1px solid rgba(56,223,255,.08);font-size:9px}.security-audit-row span{color:#65899b}.security-audit-row b{color:#7ee8ff;font-size:8px}.security-audit-row p{margin:0;color:#a6c8d8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.security-audit-empty{padding:18px;color:#698b9d;font-size:10px;text-align:center}
.security-side{min-height:0;overflow:auto;background:linear-gradient(180deg,#061827,#020b13)}.security-status-stack{display:grid;padding:8px 10px}.security-status-stack>div{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 5px;border-bottom:1px solid rgba(56,223,255,.09)}.security-status-stack span{font-size:9px;color:#6f95a7}.security-status-stack b{font-size:9px;color:#bceeff}.security-divider{height:1px;background:rgba(56,223,255,.11);margin:3px 10px 0}.security-emergency{padding:13px 12px}.security-emergency>span{font-size:8px;letter-spacing:1.5px;color:#ff6a83;font-weight:900}.security-emergency h3{margin:4px 0 6px;color:#f0dbe1;font-size:17px}.security-emergency p{margin:0 0 10px;color:#7f9cad;font-size:10px;line-height:1.4}.security-emergency button{width:100%;padding:10px}.security-emergency small{display:block;color:#7a95a4;font-size:8px;line-height:1.35;margin-top:7px}.security-emergency.stop-active{background:rgba(255,66,96,.045)}.security-emergency.stop-active h3{color:#ff788d}.security-feed-status{padding:12px}.security-feed-status span{display:block;font-size:8px;color:#668da0;text-transform:uppercase}.security-feed-status b{display:block;font-size:12px;color:#72efcc;margin:4px 0}.security-feed-status small{display:block;color:#7896a6;font-size:8px;line-height:1.35}
.exchange-connection-modal{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;background:rgba(0,5,9,.76);backdrop-filter:blur(8px)}.exchange-connection-card{width:min(560px,calc(100vw - 30px));max-height:calc(100vh - 34px);overflow:auto;background:linear-gradient(180deg,#071a29,#020c15)}.exchange-connection-warning{margin:10px 12px 0;padding:9px 10px;border:1px solid rgba(255,190,100,.2);border-radius:9px;background:rgba(255,190,100,.05);color:#9db8c4;font-size:9px;line-height:1.4}.exchange-connection-warning b{color:#ffc66d}.exchange-form{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px}.exchange-form label{display:grid;gap:5px;color:#7d9cab;font-size:9px}.exchange-form input,.exchange-form select{width:100%;background:#03121e;border:1px solid var(--line);color:#c9efff;border-radius:9px;padding:9px}.exchange-form label:nth-child(2),.exchange-form label:nth-child(3),.exchange-form label:nth-child(4),.exchange-form label:nth-child(5){grid-column:1/-1}.exchange-permission-preview{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.exchange-permission-preview p{margin:0;padding:8px;border:1px solid rgba(56,223,255,.12);border-radius:9px}.exchange-permission-preview span{display:block;font-size:8px;color:#6f91a2}.exchange-permission-preview b{display:block;font-size:9px;color:#8eeaff;margin-top:2px}.exchange-connection-result{margin:0 12px 12px;padding:8px 10px;border:1px solid rgba(56,223,255,.11);border-radius:9px;color:#7f9fb0;font-size:9px;background:rgba(3,16,26,.65)}.exchange-connection-result.ok{color:#75e9c8;border-color:rgba(30,229,164,.25)}.exchange-connection-result.warn{color:#ffc46a;border-color:rgba(255,190,100,.25)}
@media(max-width:1180px){.security-shell{grid-template-columns:1fr}.security-side{display:none}.exchange-connection-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}}@media(max-width:760px){.security-two-col{grid-template-columns:1fr}.exchange-connection-grid{grid-template-columns:1fr}.security-head{flex-direction:column}.exchange-form{grid-template-columns:1fr}}

/* QLYRA B32 — Account read-only monitor */
.qlyra-account-view{height:100%;min-height:0}.account-shell{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:10px;height:100%;min-height:0}.account-main,.account-side{min-height:0;overflow:hidden}.account-main{padding:12px;display:flex;flex-direction:column;gap:10px}.account-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.account-head h2{margin:2px 0 3px;font-size:22px}.account-head p{margin:0;color:var(--muted,#7f9bb1);font-size:12px}.account-head-actions{display:flex;align-items:center;gap:8px}.account-connection-strip{display:grid;grid-template-columns:1.3fr 1fr .8fr auto;gap:8px;align-items:end;padding:10px;border:1px solid rgba(45,190,255,.22);border-radius:12px;background:rgba(3,20,34,.55)}.account-connection-strip>div{display:flex;flex-direction:column;gap:4px}.account-connection-strip span{font-size:10px;color:#6f8ea5;text-transform:uppercase;letter-spacing:.08em}.account-connection-strip b{font-size:12px;color:#e8f8ff}.account-connection-strip select{height:34px;border-radius:8px;border:1px solid rgba(44,184,255,.28);background:#071522;color:#dff7ff;padding:0 9px;outline:none}.account-safe{color:#6ee7cf!important}.account-metric-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.account-metric-grid>div{padding:11px 12px;border:1px solid rgba(48,188,255,.2);border-radius:12px;background:linear-gradient(180deg,rgba(4,27,44,.9),rgba(3,17,29,.88));min-width:0}.account-metric-grid span{display:block;color:#6d8ca3;font-size:10px;text-transform:uppercase;letter-spacing:.08em}.account-metric-grid b{display:block;font-size:19px;margin:5px 0 2px;color:#e8fbff;font-variant-numeric:tabular-nums}.account-metric-grid small{display:block;color:#688499;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-tabs{display:flex;gap:6px;border-bottom:1px solid rgba(46,178,239,.2);padding-bottom:6px}.account-tabs button{background:transparent;border:0;color:#7d9aaf;padding:6px 10px;border-radius:7px;font-weight:700;font-size:11px}.account-tabs button.active-tool{color:#eaffff;background:rgba(14,150,215,.15);box-shadow:inset 0 0 0 1px rgba(40,197,255,.35)}.account-panel{flex:1;min-height:0;overflow:auto}.account-table-head,.account-position-row{display:grid;grid-template-columns:1.25fr 1fr .85fr .85fr 1.1fr;gap:8px;align-items:center}.account-table-head{padding:7px 10px;color:#607f97;font-size:9px;text-transform:uppercase;letter-spacing:.08em;border-bottom:1px solid rgba(43,174,233,.16)}.account-position-row{padding:10px;border-bottom:1px solid rgba(43,174,233,.11);font-size:11px}.account-position-row:hover{background:rgba(8,71,103,.13)}.account-position-row b{color:#e9faff}.account-position-row span{font-variant-numeric:tabular-nums}.account-list-empty{display:flex;align-items:center;justify-content:center;min-height:150px;color:#66879d;font-size:12px;border:1px dashed rgba(48,180,235,.16);border-radius:10px;margin-top:8px}.account-order-row,.account-history-row{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:10px;align-items:center;padding:10px;border-bottom:1px solid rgba(43,174,233,.11);font-size:11px}.account-history-row{grid-template-columns:90px 1fr}.account-assets-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:8px}.account-assets-grid>div{padding:15px;border:1px solid rgba(44,180,240,.2);border-radius:11px;background:rgba(3,21,34,.7)}.account-assets-grid span,.account-assets-grid small{display:block;color:#6d8da3;font-size:10px}.account-assets-grid b{display:block;font-size:18px;margin:5px 0;color:#e7fbff}.account-side{padding:13px;display:flex;flex-direction:column}.account-link-state{display:flex;gap:10px;align-items:flex-start;margin-top:15px}.account-link-state>span{width:11px;height:11px;border-radius:50%;background:#f3b64d;box-shadow:0 0 14px rgba(243,182,77,.55);margin-top:4px;flex:none}.account-link-state.connected>span{background:#41e5bc;box-shadow:0 0 14px rgba(65,229,188,.65)}.account-link-state b{display:block;font-size:13px;color:#e8faff}.account-link-state small{display:block;color:#6e8da4;font-size:10px;line-height:1.45;margin-top:3px}.account-checklist{display:flex;flex-direction:column;gap:11px}.account-checklist>div{display:flex;gap:9px;align-items:flex-start}.account-checklist>div>span{width:22px;height:22px;border:1px solid rgba(47,190,252,.3);border-radius:50%;display:grid;place-items:center;color:#5fdfff;font-size:10px;flex:none}.account-checklist p{margin:0}.account-checklist b{display:block;color:#dff6ff;font-size:11px}.account-checklist small{display:block;color:#6d8ba1;font-size:9px;margin-top:2px}.account-readonly-note span{color:#5bdcfb;font-size:9px;font-weight:800;letter-spacing:.12em}.account-readonly-note p{color:#6f8ca0;font-size:10px;line-height:1.45;margin:5px 0 0}@media(max-width:1200px){.account-shell{grid-template-columns:minmax(0,1fr) 250px}.account-metric-grid{grid-template-columns:repeat(3,1fr)}.account-metric-grid>div:nth-child(n+4){display:none}}@media(max-width:900px){.account-shell{grid-template-columns:1fr}.account-side{display:none}.account-connection-strip{grid-template-columns:1fr 1fr}.account-metric-grid{grid-template-columns:repeat(2,1fr)}}

/* ===== QLYRA B33 — RESPONSIVE EXCHANGE CARDS + OPPORTUNITY ENGINE ===== */
/* Security: prevent long provider names (e.g. Coinbase Advanced) from colliding with status badges. */
.exchange-card-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 76px;
  align-items:start!important;
  gap:7px!important;
}
.exchange-brand{min-width:0!important;align-items:flex-start!important}
.exchange-brand>div{min-width:0!important;max-width:100%}
.exchange-brand b{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  line-height:1.12;
  min-height:24px;
}
.exchange-brand small{white-space:normal;line-height:1.12}
.connection-state{
  width:76px;
  max-width:76px;
  min-width:76px;
  box-sizing:border-box;
  white-space:normal!important;
  text-align:center;
  line-height:1.05;
  padding:4px 3px!important;
}
@media(max-width:1360px) and (min-width:1181px){
  .exchange-connection-grid{gap:6px;padding:8px}
  .exchange-card{padding:8px}
  .exchange-card-head{grid-template-columns:minmax(0,1fr) 68px}
  .connection-state{width:68px;max-width:68px;min-width:68px;font-size:7px}
  .exchange-brand b{font-size:10px}
}

.opportunity-engine .qlyra-module-main{grid-template-rows:auto auto auto minmax(0,1fr)}
.opportunity-top-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:8px 10px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,rgba(14,77,112,.05),rgba(52,40,130,.045))}
.opportunity-top-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 9px;border:1px solid rgba(56,223,255,.14);border-radius:10px;background:linear-gradient(145deg,rgba(7,29,44,.84),rgba(3,14,24,.93));cursor:pointer;min-width:0}
.opportunity-top-card:hover,.opportunity-top-card.active{border-color:rgba(56,223,255,.46);box-shadow:0 0 18px rgba(56,223,255,.055)}
.opportunity-rank{width:24px;height:24px;border-radius:8px;display:grid;place-items:center;font-size:9px;font-weight:900;color:#61eaff;border:1px solid rgba(56,223,255,.22);background:rgba(56,223,255,.06)}
.opportunity-top-copy{min-width:0}.opportunity-top-copy b{display:block;color:#d4f5ff;font-size:11px}.opportunity-top-copy small{display:block;color:#6f95a8;font-size:8px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.opportunity-top-score{font-size:17px;font-weight:950;color:#50e9ff}.opportunity-top-empty{grid-column:1/-1;color:#6e92a4;font-size:10px;padding:5px}
.opportunity-control-right{display:flex;align-items:center;gap:7px}.opportunity-watch-count{font-size:8px;font-weight:900;color:#ffd067;border:1px solid rgba(255,208,103,.2);border-radius:999px;padding:5px 7px;background:rgba(255,208,103,.04);white-space:nowrap}
.radar-b33-grid,.radar-b33-row{display:grid!important;grid-template-columns:minmax(105px,1.08fr) 48px 78px 60px 82px 74px 82px minmax(96px,.9fr) 86px!important;gap:7px!important;align-items:center}
.radar-b33-row{min-height:44px;padding:6px 12px;border-bottom:1px solid rgba(43,115,151,.12);font-size:9px;color:#9dc7d9;cursor:pointer}.radar-b33-row:hover,.radar-b33-row.selected{background:linear-gradient(90deg,rgba(24,135,191,.08),rgba(75,73,200,.035));border-color:rgba(56,223,255,.24)}
.radar-b33-row b{color:#d6f5ff}.radar-b33-actions{display:flex;gap:4px;justify-content:flex-end}.radar-b33-actions button{padding:5px 6px;font-size:7px}.radar-bias{font-size:8px;font-weight:900;letter-spacing:.35px}.radar-bias.long{color:#48e0ac}.radar-bias.short{color:#ff7186}.radar-bias.neutral{color:#ffc367}.radar-setup{color:#99c7d9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.opportunity-plan{display:grid;gap:5px;padding:9px 10px}.opportunity-plan p{margin:0;padding:7px 8px;border:1px solid rgba(56,223,255,.1);border-radius:8px;background:rgba(3,17,28,.62)}.opportunity-plan span{display:block;color:#668da0;font-size:7px;text-transform:uppercase}.opportunity-plan b{display:block;color:#c7edf8;font-size:9px;margin-top:2px;line-height:1.2}.opportunity-focus-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 10px 10px}.opportunity-focus-actions .brain-launch{grid-column:1/-1;width:100%;margin:0!important}.opportunity-focus-actions button{font-size:9px}
@media(max-width:1220px){.opportunity-top-strip{grid-template-columns:1fr 1fr}.opportunity-top-card:nth-child(3){display:none}.radar-b33-grid,.radar-b33-row{grid-template-columns:minmax(100px,1.05fr) 44px 70px 56px 74px 70px 74px minmax(84px,.8fr) 78px!important}}
@media(max-width:1150px){.opportunity-top-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.radar-b33-grid,.radar-b33-row{grid-template-columns:minmax(100px,1.05fr) 44px 68px 56px 76px 68px 76px minmax(82px,.75fr) 76px!important}}

/* ===== QLYRA B35 — INTEGRATED BRAIN / LIVE INPUT FUSION ===== */
.brain-b35-workspace{grid-template-columns:minmax(0,1fr) 224px;grid-template-rows:58px minmax(0,1fr) 188px;grid-template-areas:"head head" "stage inspect" "intel intel";gap:6px}
.brain-intelligence-dock{grid-area:intel;min-height:0;overflow:hidden;padding:8px 10px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:7px;background:linear-gradient(180deg,rgba(5,24,39,.96),rgba(2,12,22,.98))}
.brain-intel-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}.brain-intel-top>div:first-child{min-width:0}.brain-intel-top b{display:block;color:#bcefff;font-size:9px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brain-source-strip{display:flex;gap:5px;flex-wrap:nowrap}.brain-source-strip button{display:flex;gap:5px;align-items:center;padding:5px 7px;border-radius:8px;border:1px solid rgba(56,223,255,.16);background:rgba(4,25,39,.7);color:#7fa8ba;font-size:8px;cursor:pointer}.brain-source-strip button:hover{border-color:rgba(56,223,255,.42);color:#d8f8ff}.brain-source-strip button b{margin:0;color:#ffc76b;font-size:7px}.brain-source-strip button b.live{color:#46e2ba}.brain-fusion-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(1.35fr,1.45fr);gap:6px;min-height:0}.brain-fusion-grid article{min-width:0;padding:7px 8px;border:1px solid rgba(56,223,255,.12);border-radius:9px;background:rgba(2,15,25,.72);overflow:hidden}.brain-fusion-grid article>span{display:block;color:#5e91a6;font-size:7px;font-weight:900;letter-spacing:.08em}.brain-fusion-grid article>b{display:block;color:#d9f8ff;font-size:10px;margin:4px 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brain-fusion-grid article>small{display:-webkit-box;color:#78a0b2;font-size:8px;line-height:1.3;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.brain-fusion-grid .brain-synthesis-card{border-color:rgba(69,207,255,.26);background:linear-gradient(145deg,rgba(4,36,53,.82),rgba(10,20,45,.76))}.brain-fusion-grid .brain-synthesis-card>b{color:#64e8ff}.brain-fusion-actions{display:flex;align-items:center;gap:6px}.brain-fusion-actions button{font-size:8px;padding:6px 9px}.brain-fusion-actions>span{margin-left:auto;color:#56788b;font-size:7px;font-weight:800;letter-spacing:.08em}.brain-controls #brainLiveState{align-self:center}
@media(max-height:800px) and (min-width:1000px){.brain-b35-workspace{grid-template-rows:54px minmax(0,1fr) 158px}.brain-fusion-grid article{padding:5px 7px}.brain-fusion-grid article>small{-webkit-line-clamp:1}}
@media(max-width:1180px) and (min-width:1000px){.brain-b35-workspace{grid-template-columns:minmax(0,1fr) 205px}.brain-fusion-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.brain-synthesis-card{grid-column:1/-1;display:none}.brain-source-strip button span{display:none}}
@media(max-width:999px){.brain-b35-workspace{height:auto;grid-template-columns:1fr;grid-template-rows:auto 500px auto auto;grid-template-areas:"head" "stage" "inspect" "intel"}.brain-intelligence-dock{min-height:440px}.brain-fusion-grid{grid-template-columns:1fr 1fr}.brain-synthesis-card{grid-column:1/-1}.brain-intel-top{align-items:flex-start;flex-direction:column}.brain-fusion-actions{flex-wrap:wrap}.brain-fusion-actions>span{margin-left:0;width:100%}}


/* ===== QLYRA B36 — ALERT ENGINE ===== */
.qlyra-alerts-view{height:100%;min-height:0}.alerts-shell{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:10px;height:100%;min-height:0}.alerts-main,.alerts-side{min-height:0}.alerts-main{overflow:hidden;display:flex;flex-direction:column}.alerts-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:18px 18px 12px;border-bottom:1px solid rgba(60,209,255,.18)}.alerts-head h2{margin:4px 0 2px;font-size:24px}.alerts-head p{margin:0;color:var(--muted);font-size:12px}.alerts-head-actions{display:flex;align-items:center;gap:8px}.alert-create-grid{display:grid;grid-template-columns:1.25fr 1fr 1fr 1fr auto auto;gap:8px;padding:12px 14px;border-bottom:1px solid rgba(60,209,255,.14);align-items:end}.alert-create-grid label{display:flex;flex-direction:column;gap:5px;min-width:0}.alert-create-grid label>span{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:#78a8c2}.alert-create-grid input,.alert-create-grid select{height:36px;border:1px solid rgba(49,197,255,.28);border-radius:9px;background:#071622;color:#dff7ff;padding:0 10px;min-width:0}.alert-create-grid button{height:36px;white-space:nowrap}.alerts-summary-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:10px 14px}.alerts-summary-strip>div{border:1px solid rgba(49,197,255,.16);border-radius:9px;padding:8px 10px;background:rgba(3,17,29,.58)}.alerts-summary-strip span{display:block;color:#719ab1;font-size:9px;text-transform:uppercase;letter-spacing:.1em}.alerts-summary-strip b{display:block;color:#dffbff;font-size:15px;margin-top:2px}.alerts-table-head,.alert-row{display:grid;grid-template-columns:1.15fr .95fr 1.05fr 1fr 1fr .9fr 1.05fr;gap:8px;align-items:center}.alerts-table-head{padding:8px 14px;color:#6f9ab2;font-size:9px;text-transform:uppercase;letter-spacing:.09em;border-top:1px solid rgba(49,197,255,.12);border-bottom:1px solid rgba(49,197,255,.12)}.alerts-rows{overflow:auto;min-height:0;flex:1}.alert-row{padding:10px 14px;border-bottom:1px solid rgba(49,197,255,.10);font-size:12px}.alert-row:hover{background:rgba(22,181,235,.05)}.alert-row b{color:#e7fbff}.alert-row small{display:block;color:#6f9ab2;margin-top:2px}.alert-status{display:inline-flex;width:max-content;border:1px solid rgba(74,218,255,.28);border-radius:999px;padding:3px 8px;font-size:9px;font-weight:800;letter-spacing:.08em}.alert-status.armed{color:#52f1d0;background:rgba(22,176,151,.08)}.alert-status.triggered{color:#ffd25a;background:rgba(255,183,37,.08);border-color:rgba(255,183,37,.28)}.alert-status.paused{color:#8198a6}.alert-actions{display:flex;gap:5px}.alert-actions button{font-size:10px;padding:6px 8px}.alerts-side{padding:14px;display:flex;flex-direction:column;gap:12px}.alert-side-state{display:flex;gap:10px;align-items:center;padding:12px;border:1px solid rgba(49,197,255,.18);border-radius:10px}.alert-side-state b{display:block}.alert-side-state small{display:block;color:#789eb3;margin-top:3px;line-height:1.35}.alert-pulse{width:10px;height:10px;border-radius:50%;background:#25e4c1;box-shadow:0 0 12px rgba(37,228,193,.9);flex:none}.alert-rule-box{padding:11px;border:1px solid rgba(49,197,255,.14);border-radius:10px;background:rgba(3,17,29,.45)}.alert-rule-box span{font-size:9px;color:#55dfff;text-transform:uppercase;letter-spacing:.1em;font-weight:800}.alert-rule-box p{margin:6px 0 0;color:#89a9ba;font-size:11px;line-height:1.45}.alerts-side .brain-launch{margin-top:auto}@media(max-width:1250px){.alerts-shell{grid-template-columns:minmax(0,1fr) 250px}.alert-create-grid{grid-template-columns:1fr 1fr 1fr 1fr}.alert-create-grid button{width:100%}.alerts-table-head,.alert-row{grid-template-columns:1.1fr .85fr 1fr .9fr .9fr .8fr 1fr;font-size:10px}}@media(max-width:980px){.alerts-shell{grid-template-columns:1fr}.alerts-side{display:none}}


/* ===== QLYRA B37 — auth/session + backend bridge polish ===== */
#accountBackendState{color:#f5c96a;white-space:nowrap}
#accountBackendState.positive{color:#43e6b0}
#accountTestBackend{white-space:nowrap;min-width:104px}
.account-connection-strip{grid-template-columns:minmax(135px,1fr) minmax(120px,.8fr) minmax(105px,.7fr) minmax(90px,.6fr) auto auto;gap:8px;align-items:end}
#loginSessionNote{display:block;min-height:28px;line-height:1.3}
[data-planned-project]{position:relative}
@media(max-width:1260px){
  .account-connection-strip{grid-template-columns:1fr 1fr 1fr;}
  #accountTestBackend,#accountOpenSecurity{width:100%}
}

/* ===== QLYRA B38 — ACCOUNT BRIDGE HEALTH ===== */
.account-health-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:8px;align-items:stretch;margin:10px 0 14px}.account-health-strip>div{border:1px solid rgba(30,186,255,.18);background:rgba(5,24,38,.58);border-radius:10px;padding:8px 10px;min-width:0}.account-health-strip span{display:block;font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#6f9fb7;margin-bottom:4px}.account-health-strip b{display:block;font-size:11px;color:#d8f4ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-health-strip b.positive{color:#35efc0}.account-health-strip b.warn{color:#ffc45a}.account-health-strip #accountHealthGate{color:#ffc45a}.account-health-strip button{min-width:96px}@media(max-width:1200px){.account-health-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.account-health-strip button{grid-column:1/-1}}

/* ===== QLYRA B39 — bilingual + hands-free voice ===== */
.lang-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid rgba(111,214,255,.18);border-radius:10px;background:rgba(5,18,31,.58)}
.lang-switch button{min-width:34px;padding:6px 8px;border:0;border-radius:7px;background:transparent;color:#7890a4;font:700 11px/1 inherit;cursor:pointer}
.lang-switch button.active-tool{background:rgba(76,196,255,.14);color:#8fe8ff;box-shadow:inset 0 0 0 1px rgba(76,196,255,.2)}
.login-lang-row{margin-top:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#7f95a8;font-size:11px}
.wake-state{margin-top:10px;padding:10px 12px;border:1px solid rgba(77,205,255,.14);border-radius:10px;background:rgba(6,18,31,.48);display:grid;grid-template-columns:auto auto;gap:4px 10px;align-items:center}
.wake-state span{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:#6f8799}.wake-state b{justify-self:end;color:#6ee7ff;font-size:11px}.wake-state small{grid-column:1/-1;color:#6f8394;line-height:1.35}
.alert-voice-toggle{margin-top:8px;padding:10px 12px;border:1px solid rgba(76,196,255,.12);border-radius:10px;background:rgba(4,17,29,.45)}
@media(max-width:1180px){header .lang-switch{transform:scale(.92);transform-origin:right center}.lang-switch button{min-width:30px;padding:5px 6px}}


/* ===== QLYRA B41 · SECURE ACCOUNT READINESS ===== */
.b41-readiness-card{padding:12px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,rgba(56,223,255,.045),rgba(255,255,255,.01));}
.b41-readiness-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.b41-readiness-head div{display:grid;gap:3px}.b41-readiness-head span{font-size:10px;letter-spacing:1.1px;color:var(--cyan)}.b41-readiness-head b{font-size:14px}.b41-readiness-head>span{font-size:13px;font-weight:800;padding:6px 9px;border:1px solid var(--line);border-radius:999px;background:var(--card2)}
.b41-readiness-steps{display:grid;gap:7px}.b41-readiness-steps>div{display:grid;grid-template-columns:26px 1fr auto;align-items:center;gap:8px;padding:8px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.015)}.b41-readiness-steps i{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-style:normal;border:1px solid var(--line);color:var(--muted)}.b41-readiness-steps p{margin:0;display:grid;gap:2px}.b41-readiness-steps small{color:var(--muted);line-height:1.25}.b41-readiness-steps em{font-style:normal;font-size:10px;font-weight:800;color:#ffbd69}.b41-readiness-steps>div.ready{border-color:rgba(68,222,168,.35);background:rgba(68,222,168,.04)}.b41-readiness-steps>div.ready i,.b41-readiness-steps>div.ready em{color:var(--green);border-color:rgba(68,222,168,.35)}.b41-readiness-steps>div.blocked{border-color:rgba(255,183,74,.3)}.b41-readiness-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.b41-readiness-help{margin:9px 2px 0;color:var(--muted);font-size:11px;line-height:1.35}
@media(max-width:1200px){.b41-readiness-actions{grid-template-columns:1fr}}

/* QLYRA MASTER V1 stability */
header .lang-switch{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto!important;
}
header .lang-switch button{min-width:34px!important}

/* ===== QLYRA B50 · ACCOUNT REAL POLISH ===== */
.b50-real-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:10px 0 12px;
}
.b50-real-summary>div{
  background:linear-gradient(180deg,rgba(8,31,46,.92),rgba(4,18,29,.92));
  border:1px solid rgba(73,194,255,.16);
  border-radius:12px;
  padding:10px 12px;
  min-width:0;
}
.b50-real-summary span{
  display:block;
  font-size:10px;
  letter-spacing:.14em;
  color:#6f8ba0;
  margin-bottom:5px;
}
.b50-real-summary b{
  display:block;
  color:#dff8ff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.b50-assets-panel{
  margin-top:12px;
  border:1px solid rgba(73,194,255,.16);
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(7,25,39,.96),rgba(3,15,25,.96));
}
.b50-assets-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid rgba(73,194,255,.14);
}
.b50-assets-head span{
  display:block;
  font-size:10px;
  letter-spacing:.14em;
  color:#49d9ff;
}
.b50-assets-head b{color:#e8faff}
.b50-assets-head small{color:#52e2b1}
.b50-assets-row{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr 1fr .8fr;
  gap:12px;
  align-items:center;
  padding:10px 14px;
  border-bottom:1px solid rgba(255,255,255,.05);
  font-size:12px;
}
.b50-assets-header{
  color:#6f8ba0;
  font-size:10px;
  letter-spacing:.08em;
  background:rgba(255,255,255,.02);
}
.b50-assets-body .b50-assets-row:last-child{border-bottom:0}
.b50-coin{
  display:flex;
  align-items:center;
  gap:9px;
  font-weight:800;
  color:#eaf9ff;
}
.b50-coin-badge{
  width:28px;height:28px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(37,215,255,.10);
  border:1px solid rgba(37,215,255,.22);
  color:#52dbff;
  font-size:10px;
}
.b50-status-ready{color:#52e2b1!important}
.b50-status-muted{color:#6f8ba0!important}
.b50-empty{padding:18px;color:#6f8ba0;text-align:center}

/* left nav gets more presence now instead of waiting for final polish */
.sidebar,.left-nav,aside.nav-rail{
  min-width:116px;
}
.nav{
  padding:10px 12px!important;
  margin:3px 6px!important;
  border-radius:10px!important;
  transition:transform .14s ease,background .14s ease,box-shadow .14s ease!important;
}
.nav:hover{
  transform:translateX(2px);
  box-shadow:inset 0 0 0 1px rgba(61,217,255,.18),0 5px 18px rgba(0,0,0,.14);
}
.nav.active{
  box-shadow:inset 0 0 0 1px rgba(61,217,255,.40),0 7px 20px rgba(0,0,0,.18)!important;
}

/* voice button: smaller and lifted so it does not cover content */
#voiceFloat,.voice-float,.floating-voice{
  right:18px!important;
  bottom:18px!important;
  transform:scale(.92);
  transform-origin:right bottom;
}
@media(max-width:1100px){
  .b50-real-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .b50-assets-row{grid-template-columns:1fr .9fr .9fr .9fr}
  .b50-assets-row span:last-child{display:none}
}

/* B51: functional account resync + voice navigation fixes. */

/* ===== QLYRA B52 · REAL ASSETS + PERSISTENT ACCOUNT SYNC ===== */
.b52-sync-meta{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
  margin-right:8px;
  font-size:10px;
  color:#6f8ba0;
  white-space:nowrap;
}
.b52-sync-meta b{
  color:#9eeeff;
  font-size:11px;
}
.b52-assets-table{
  margin-top:12px;
  overflow:hidden;
  border:1px solid rgba(72,200,255,.14);
  border-radius:12px;
  background:rgba(3,15,25,.42);
}
.b52-assets-head,.b52-asset-row{
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr 1fr .7fr;
  gap:10px;
  align-items:center;
  padding:10px 12px;
}
.b52-assets-head{
  color:#6f8ba0;
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  border-bottom:1px solid rgba(72,200,255,.12);
  background:rgba(255,255,255,.02);
}
.b52-asset-row{
  border-bottom:1px solid rgba(255,255,255,.045);
  font-size:12px;
  color:#dff8ff;
}
.b52-asset-row:last-child{border-bottom:0}
.b52-asset-coin{
  display:flex;
  align-items:center;
  gap:9px;
  font-weight:800;
}
.b52-asset-badge{
  width:28px;height:28px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(44,214,255,.09);
  border:1px solid rgba(44,214,255,.20);
  color:#58ddff;
  font-size:9px;
  flex:0 0 auto;
}
.b52-ready{color:#52e2b1}
.b52-wait{color:#6f8ba0}

/* incremental visual polish */
.layout > aside{
  width:122px!important;
  min-width:122px!important;
}
.nav{
  min-height:36px!important;
  font-size:12px!important;
  font-weight:750!important;
  letter-spacing:.01em;
}
.nav.active{
  background:linear-gradient(180deg,rgba(16,71,96,.72),rgba(5,35,52,.84))!important;
  box-shadow:inset 0 0 0 1px rgba(67,219,255,.52),0 8px 22px rgba(0,0,0,.18)!important;
}
#voiceFloat,.voice-float,.floating-voice{
  bottom:14px!important;
  right:16px!important;
  max-width:130px!important;
}
@media(max-width:1100px){
  .b52-assets-head,.b52-asset-row{grid-template-columns:1.2fr 1fr 1fr 1fr}
  .b52-assets-head span:last-child,.b52-asset-row span:last-child{display:none}
}

/* ===== QLYRA B53 · ACCOUNT TAB STABILITY ===== */
.b53-account-state{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 10px;
  margin:8px 0 4px;
  border:1px solid rgba(64,214,255,.12);
  border-radius:9px;
  background:rgba(3,16,26,.34);
}
.b53-account-state span{
  color:#648499;
  font-size:9px;
  letter-spacing:.14em;
}
.b53-account-state b{
  color:#55e3b3;
  font-size:10px;
}
.account-panel{
  min-height:150px;
}
.account-panel.hidden{
  display:none!important;
}
.account-panel:not(.hidden){
  display:block!important;
}

/* B61 targeted Security fix */
.b61-connected{color:#52e2b1!important}
.exchange-card.private-connected{border-color:rgba(82,226,177,.42)!important}

/* ===== QLYRA B63 · ROLES & ACCESS ===== */
.b63-roles-card{margin-top:14px}
.b63-role-summary{display:grid;grid-template-columns:1.4fr 1fr;gap:10px;margin-top:10px}
.b63-role-summary>div{border:1px solid rgba(75,205,255,.14);border-radius:11px;padding:11px 12px;background:rgba(3,17,28,.42)}
.b63-role-summary span{display:block;font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#68889e}
.b63-role-summary b{display:block;margin:4px 0 2px;color:#e5f8ff;font-size:12px}
.b63-role-summary small{color:#66859a}
.b63-role-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.b63-role-card{border:1px solid rgba(75,205,255,.12);border-radius:11px;padding:11px 12px;background:rgba(3,17,28,.35)}
.b63-role-card.active{border-color:rgba(80,226,178,.35);box-shadow:inset 0 0 0 1px rgba(80,226,178,.06)}
.b63-role-card>div{display:flex;justify-content:space-between;align-items:center;gap:10px}
.b63-role-card b{color:#e8fbff}
.b63-role-card span{font-size:9px;color:#58e0b0;letter-spacing:.08em}
.b63-role-card p{margin:7px 0 0;color:#7390a3;font-size:10px;line-height:1.45}
.b63-permission-table{margin-top:10px;border:1px solid rgba(75,205,255,.12);border-radius:11px;overflow:hidden}
.b63-permission-row{display:grid;grid-template-columns:1fr 90px 90px;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid rgba(255,255,255,.045);font-size:10px}
.b63-permission-row:last-child{border-bottom:0}
.b63-permission-row.head{color:#69889d;letter-spacing:.08em;text-transform:uppercase;background:rgba(255,255,255,.02)}
.b63-permission-row b{text-align:center;color:#55e2b2}
.b63-permission-row b.locked{color:#ffc062;font-size:9px}
@media(max-width:1050px){.b63-role-summary,.b63-role-grid{grid-template-columns:1fr}}

/* ===== QLYRA B64 · ROLE ENFORCEMENT ===== */
.b64-access-toast{
  position:fixed;
  right:22px;
  bottom:70px;
  z-index:99999;
  padding:11px 14px;
  border-radius:10px;
  border:1px solid rgba(255,190,80,.35);
  background:rgba(21,18,8,.96);
  color:#ffd27a;
  font-size:11px;
  font-weight:800;
  box-shadow:0 14px 40px rgba(0,0,0,.35);
}
.b64-disabled{
  opacity:.42!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
}

/* ===== QLYRA B68 · THEME CONTROLS RESTORED ===== */
header .theme-switch{
  display:inline-flex!important;
  align-items:center;
  gap:4px;
  margin-left:auto;
  flex:0 0 auto;
}
header .theme-switch button{
  min-width:58px;
  padding:8px 10px;
  border:1px solid var(--line);
  background:var(--card2);
  color:var(--text);
}
header .theme-switch button.active-tool{
  border-color:var(--cyan);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--cyan) 45%,transparent);
}

/* ===== QLYRA B69 · DAY THEME POLISH ===== */
html[data-theme=light] body{
  background:#edf4fa;
  color:#0b2035;
}

html[data-theme=light] header{
  background:#f7fbff;
  border-bottom-color:#b7d0e2;
  box-shadow:0 2px 14px rgba(15,55,85,.08);
}

html[data-theme=light] .layout > aside{
  background:#f4f9fd;
  border-right-color:#bfd5e5;
}

html[data-theme=light] .nav{
  color:#27445a;
  font-weight:700;
}

html[data-theme=light] .nav:hover{
  background:#dcecf8;
  color:#0b2035;
}

html[data-theme=light] .nav.active{
  background:#d3eafa;
  color:#08253d;
  box-shadow:inset 3px 0 #0879d9;
}

html[data-theme=light] .card,
html[data-theme=light] .security-section,
html[data-theme=light] .b63-role-card,
html[data-theme=light] .b63-role-summary>div,
html[data-theme=light] .b63-permission-table,
html[data-theme=light] .b50-real-summary>div,
html[data-theme=light] .b50-assets-panel{
  background:#ffffff;
  border-color:#bfd5e5;
  box-shadow:0 8px 28px rgba(17,66,99,.07);
}

html[data-theme=light] .title,
html[data-theme=light] .security-section-head,
html[data-theme=light] .b50-assets-head{
  border-bottom-color:#c8dae7;
}

html[data-theme=light] .secondary,
html[data-theme=light] .toolbar button,
html[data-theme=light] .theme-switch button,
html[data-theme=light] .lang-switch button,
html[data-theme=light] .market-tabs button,
html[data-theme=light] .compact-tabs button{
  background:#f3f8fc;
  border-color:#b9d0e1;
  color:#17364d;
}

html[data-theme=light] .theme-switch button.active-tool,
html[data-theme=light] .lang-switch button.active-tool,
html[data-theme=light] .toolbar .active-tool{
  background:#d8ebfa;
  border-color:#0879d9;
  color:#07345a;
  box-shadow:0 0 0 1px rgba(8,121,217,.16);
}

html[data-theme=light] .search,
html[data-theme=light] input,
html[data-theme=light] select,
html[data-theme=light] textarea{
  background:#ffffff;
  color:#0b2035;
  border-color:#b7cede;
}

html[data-theme=light] .search::placeholder,
html[data-theme=light] input::placeholder,
html[data-theme=light] textarea::placeholder{
  color:#708ba0;
}

html[data-theme=light] .security-side,
html[data-theme=light] .market-dock{
  background:#f8fbfe;
}

html[data-theme=light] .security-status-stack span,
html[data-theme=light] .security-feed-status span,
html[data-theme=light] .security-emergency p,
html[data-theme=light] .security-emergency small,
html[data-theme=light] .security-section-head small,
html[data-theme=light] .b63-role-card p,
html[data-theme=light] .b63-role-summary small,
html[data-theme=light] .note,
html[data-theme=light] .market-focus-note{
  color:#607d92;
}

html[data-theme=light] .security-status-stack b,
html[data-theme=light] .security-feed-status b,
html[data-theme=light] .b63-role-card b,
html[data-theme=light] .b63-role-summary b,
html[data-theme=light] .b50-real-summary b{
  color:#14344b;
}

html[data-theme=light] .security-rule-list>div,
html[data-theme=light] .b63-permission-row,
html[data-theme=light] .security-audit-row,
html[data-theme=light] .b50-assets-row{
  border-bottom-color:#d8e6ef;
}

html[data-theme=light] .security-audit-row,
html[data-theme=light] .b63-permission-row{
  color:#23445c;
}

html[data-theme=light] .security-emergency{
  background:#fff7f7;
  border-color:#e7b9c0;
}

html[data-theme=light] .danger-action{
  color:#fff;
}

html[data-theme=light] .role-pill{
  color:#0879d9;
  border-color:#0879d9;
  background:#eef7fd;
}

html[data-theme=light] .demo-badge,
html[data-theme=light] .security-policy-pill{
  background:#eef7fb;
  border-color:#9fc4d8;
  color:#0e5d83;
}

html[data-theme=light] main{
  background:#edf4fa;
}

/* Preserve premium dark content zones where contrast is intentional. */
html[data-theme=light] .exchange-connection-grid > *,
html[data-theme=light] .execution-gate-state{
  background:#f8fbfe;
  border-color:#bfd5e5;
}

html[data-theme=light] .exchange-connection-grid b,
html[data-theme=light] .exchange-connection-grid p,
html[data-theme=light] .exchange-connection-grid small{
  color:#24465e;
}

/* ===== QLYRA B70 · FORCE LIGHT THEME OVER DARK LEGACY !IMPORTANT RULES ===== */
html[data-theme=light] body{
  background:#edf4fa!important;
  color:#0b2035!important;
}

html[data-theme=light] header{
  background:#f7fbff!important;
  border-bottom-color:#b7d0e2!important;
}

html[data-theme=light] .layout > aside{
  background:#f4f9fd!important;
  border-right-color:#bfd5e5!important;
}

html[data-theme=light] .nav{
  color:#24445b!important;
  background:transparent!important;
}

html[data-theme=light] .nav:hover{
  background:#e3f0f8!important;
  color:#0b2035!important;
}

html[data-theme=light] .nav.active{
  background:#d7ebf8!important;
  color:#08253d!important;
  border-color:#8fbed9!important;
  box-shadow:inset 3px 0 #0879d9,0 4px 14px rgba(20,80,115,.08)!important;
}

html[data-theme=light] main{
  background:#edf4fa!important;
}

html[data-theme=light] .card,
html[data-theme=light] .security-section,
html[data-theme=light] .security-side,
html[data-theme=light] .security-policy-card,
html[data-theme=light] .security-gate-card,
html[data-theme=light] .security-audit-card,
html[data-theme=light] .b63-role-card,
html[data-theme=light] .b63-role-summary>div,
html[data-theme=light] .b63-permission-table,
html[data-theme=light] .b50-real-summary>div,
html[data-theme=light] .b50-assets-panel,
html[data-theme=light] .exchange-connection-grid>div,
html[data-theme=light] .exchange-card,
html[data-theme=light] .market-dock{
  background:#ffffff!important;
  border-color:#bfd5e5!important;
  color:#16384f!important;
  box-shadow:0 8px 24px rgba(20,70,100,.07)!important;
}

html[data-theme=light] .title,
html[data-theme=light] .security-section-head,
html[data-theme=light] .b50-assets-head,
html[data-theme=light] .security-audit-card .security-section-head{
  border-bottom-color:#c8dae7!important;
  color:#16384f!important;
}

html[data-theme=light] .secondary,
html[data-theme=light] .toolbar button,
html[data-theme=light] .theme-switch button,
html[data-theme=light] .lang-switch button,
html[data-theme=light] .market-tabs button,
html[data-theme=light] .compact-tabs button,
html[data-theme=light] .exchange-connection-grid button{
  background:#f3f8fc!important;
  border-color:#b9d0e1!important;
  color:#17364d!important;
}

html[data-theme=light] .theme-switch button.active-tool,
html[data-theme=light] .lang-switch button.active-tool,
html[data-theme=light] .toolbar .active-tool{
  background:#d8ebfa!important;
  border-color:#0879d9!important;
  color:#07345a!important;
  box-shadow:0 0 0 1px rgba(8,121,217,.18)!important;
}

html[data-theme=light] .search,
html[data-theme=light] input,
html[data-theme=light] select,
html[data-theme=light] textarea{
  background:#ffffff!important;
  color:#0b2035!important;
  border-color:#b7cede!important;
}

html[data-theme=light] .security-status-stack span,
html[data-theme=light] .security-feed-status span,
html[data-theme=light] .security-emergency p,
html[data-theme=light] .security-emergency small,
html[data-theme=light] .security-section-head small,
html[data-theme=light] .b63-role-card p,
html[data-theme=light] .b63-role-summary small,
html[data-theme=light] .note,
html[data-theme=light] .market-focus-note,
html[data-theme=light] .exchange-connection-grid small,
html[data-theme=light] .exchange-connection-grid p{
  color:#607d92!important;
}

html[data-theme=light] .security-status-stack b,
html[data-theme=light] .security-feed-status b,
html[data-theme=light] .b63-role-card b,
html[data-theme=light] .b63-role-summary b,
html[data-theme=light] .b50-real-summary b,
html[data-theme=light] .exchange-connection-grid b{
  color:#14344b!important;
}

html[data-theme=light] .security-rule-list>div,
html[data-theme=light] .b63-permission-row,
html[data-theme=light] .security-audit-row,
html[data-theme=light] .b50-assets-row{
  border-bottom-color:#d8e6ef!important;
  color:#23445c!important;
  background:#fff!important;
}

html[data-theme=light] .security-emergency{
  background:#fff4f5!important;
  border-color:#e4b8be!important;
}

html[data-theme=light] .danger-action{
  color:#fff!important;
}

html[data-theme=light] .role-pill{
  color:#0879d9!important;
  border-color:#0879d9!important;
  background:#eef7fd!important;
}

html[data-theme=light] .demo-badge,
html[data-theme=light] .security-policy-pill{
  background:#eef7fb!important;
  border-color:#9fc4d8!important;
  color:#0e5d83!important;
}

html[data-theme=light] .execution-gate-state{
  background:#f8fbfe!important;
  border-color:#bfd5e5!important;
  color:#17364d!important;
}

/* ===== QLYRA B72 · VOICE CONTROL REHOMED TO HEADER ===== */
.voice-float,
.floating-voice{
  display:none!important;
}

header .header-voice-btn{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:72px;
  height:34px;
  padding:0 10px;
  border:1px solid color-mix(in srgb,var(--cyan) 55%,var(--line));
  border-radius:10px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--card2) 86%,var(--cyan) 14%),var(--card2));
  color:var(--cyan);
  font-size:11px;
  font-weight:850;
  letter-spacing:.04em;
  box-shadow:inset 0 0 0 1px rgba(56,223,255,.05);
  cursor:pointer;
}

header .header-voice-btn:hover{
  transform:translateY(-1px);
  border-color:var(--cyan);
  box-shadow:0 6px 18px rgba(24,170,220,.14);
}

header .header-voice-btn.voice-live{
  border-color:color-mix(in srgb,var(--cyan) 75%,var(--line));
}

.header-voice-icon{
  line-height:1;
  font-size:13px;
}

html[data-theme=light] header .header-voice-btn{
  background:#eef7fd!important;
  border-color:#8abedc!important;
  color:#086fae!important;
  box-shadow:none!important;
}

@media(max-width:1180px){
  header .header-voice-btn{
    min-width:36px;
    width:36px;
    padding:0;
  }
  header .header-voice-label{
    display:none;
  }
}

/* ===== QLYRA B73 · HEADER + SIDEBAR PREMIUM POLISH ===== */

/* Give the left rail a little more visual presence without stealing chart space. */
.layout{
  grid-template-columns:146px minmax(0,1fr)!important;
}

.layout > aside{
  width:146px!important;
  min-width:146px!important;
  padding:14px 10px!important;
  background:
    linear-gradient(180deg,rgba(4,18,29,.98),rgba(2,11,19,.99))!important;
  border-right:1px solid rgba(55,207,255,.18)!important;
  box-shadow:10px 0 28px rgba(0,0,0,.10);
}

.nav{
  min-height:42px!important;
  padding:10px 12px!important;
  margin:4px 2px!important;
  border-radius:11px!important;
  font-size:12.5px!important;
  font-weight:800!important;
  line-height:1.12!important;
  letter-spacing:.01em!important;
  color:#d8edf8!important;
  border:1px solid transparent!important;
  transition:transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease!important;
}

.nav:hover{
  transform:translateX(3px)!important;
  background:linear-gradient(90deg,rgba(19,77,105,.66),rgba(6,35,51,.72))!important;
  border-color:rgba(62,216,255,.24)!important;
  color:#f1fbff!important;
}

.nav.active{
  transform:translateX(2px)!important;
  background:
    linear-gradient(90deg,rgba(19,96,130,.86),rgba(6,45,66,.90))!important;
  border-color:rgba(70,226,255,.48)!important;
  color:#ffffff!important;
  box-shadow:
    inset 3px 0 #39e1ff,
    0 8px 22px rgba(0,0,0,.20),
    0 0 18px rgba(52,213,255,.08)!important;
}

/* Slightly more polished top bar; controls get room to breathe. */
header{
  min-height:64px!important;
  gap:8px!important;
  padding:8px 12px!important;
}

header .brand{
  min-width:170px!important;
  flex:0 0 170px!important;
}

header .brand b{
  letter-spacing:3px!important;
}

header .search{
  max-width:none!important;
  min-width:260px!important;
  flex:1 1 420px!important;
  margin:0!important;
}

header .theme-switch{
  margin-left:4px!important;
  gap:4px!important;
}

header .theme-switch button{
  min-width:54px!important;
  height:34px!important;
  padding:0 8px!important;
}

header .lang-switch{
  gap:3px!important;
}

header .lang-switch button{
  min-width:34px!important;
  height:34px!important;
  padding:0 8px!important;
}

header .header-voice-btn{
  min-width:76px!important;
  height:34px!important;
}

#qlyraBuildBadge{
  flex:0 0 auto!important;
}

.role-pill{
  height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  padding:0 11px!important;
  flex:0 0 auto!important;
}

#logoutBtn{
  height:34px!important;
  padding:0 11px!important;
  flex:0 0 auto!important;
}

/* Light mode matching for the wider rail. */
html[data-theme=light] .layout > aside{
  background:linear-gradient(180deg,#f7fbfe,#eef6fb)!important;
  border-right-color:#b7d0e2!important;
  box-shadow:8px 0 24px rgba(20,70,100,.06)!important;
}

html[data-theme=light] .nav{
  color:#29485f!important;
}

html[data-theme=light] .nav:hover{
  background:#e2f0f8!important;
  border-color:#b9d5e6!important;
  color:#0b2035!important;
}

html[data-theme=light] .nav.active{
  background:linear-gradient(90deg,#d7edf9,#eaf6fc)!important;
  border-color:#8dbdd8!important;
  color:#08253d!important;
  box-shadow:inset 3px 0 #0879d9,0 6px 16px rgba(20,80,115,.08)!important;
}

/* Responsive fallback so the header does not collapse awkwardly. */
@media(max-width:1250px){
  .layout{
    grid-template-columns:136px minmax(0,1fr)!important;
  }
  .layout > aside{
    width:136px!important;
    min-width:136px!important;
  }
  header .brand{
    min-width:145px!important;
    flex-basis:145px!important;
  }
  header .theme-switch button{
    min-width:42px!important;
    font-size:10px!important;
  }
  header .header-voice-btn{
    min-width:38px!important;
    width:38px!important;
    padding:0!important;
  }
  header .header-voice-label{
    display:none!important;
  }
}

/* ===== QLYRA B74 · HOMOGENEOUS SIDEBAR CARD BUTTONS ===== */

/* Make the left rail feel like a stack of compact market cards. */
.layout > aside{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
}

.nav{
  width:100%!important;
  min-height:46px!important;
  height:46px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding:0 12px!important;
  margin:0!important;
  border-radius:12px!important;
  background:
    linear-gradient(180deg,rgba(10,31,45,.92),rgba(4,18,29,.96))!important;
  border:1px solid rgba(54,166,207,.20)!important;
  color:#d7edf8!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.02),
    0 5px 14px rgba(0,0,0,.14)!important;
  text-align:left!important;
  white-space:normal!important;
}

.nav:hover{
  transform:translateX(2px)!important;
  background:
    linear-gradient(180deg,rgba(16,47,65,.98),rgba(6,28,41,.98))!important;
  border-color:rgba(64,214,255,.36)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 7px 18px rgba(0,0,0,.18),
    0 0 16px rgba(54,210,255,.06)!important;
}

.nav.active{
  transform:none!important;
  background:
    linear-gradient(180deg,rgba(18,77,104,.98),rgba(7,39,56,.98))!important;
  border-color:rgba(74,225,255,.58)!important;
  color:#ffffff!important;
  box-shadow:
    inset 3px 0 #38e0ff,
    inset 0 1px 0 rgba(255,255,255,.05),
    0 7px 20px rgba(0,0,0,.20),
    0 0 18px rgba(53,217,255,.08)!important;
}

/* Keep multi-line labels vertically balanced and same visual weight. */
.nav[data-view="smart"],
.nav[data-view="voice"]{
  line-height:1.08!important;
}

/* Light theme: same card rhythm, softer shadows. */
html[data-theme=light] .layout > aside{
  gap:6px!important;
}

html[data-theme=light] .nav{
  background:linear-gradient(180deg,#f7fbfe,#edf6fb)!important;
  border-color:#bfd7e6!important;
  color:#29485f!important;
  box-shadow:0 4px 12px rgba(20,70,100,.06)!important;
}

html[data-theme=light] .nav:hover{
  background:linear-gradient(180deg,#edf7fc,#e4f1f8)!important;
  border-color:#9cc7dd!important;
  color:#0b2035!important;
}

html[data-theme=light] .nav.active{
  background:linear-gradient(180deg,#d9edf9,#e9f6fc)!important;
  border-color:#83b9d6!important;
  color:#08253d!important;
  box-shadow:
    inset 3px 0 #0879d9,
    0 5px 14px rgba(20,80,115,.08)!important;
}

/* Slightly reduce unused rail whitespace at lower resolutions. */
@media(max-height:780px){
  .nav{
    min-height:42px!important;
    height:42px!important;
    font-size:12px!important;
  }
  .layout > aside{
    gap:5px!important;
    padding-top:10px!important;
    padding-bottom:10px!important;
  }
}

/* ===== QLYRA B75 · SIDEBAR FRAME + ICONS + VOICE PRIORITY ===== */

/* Enclose the whole navigation rail so it reads as one premium module. */
.layout{
  grid-template-columns:158px minmax(0,1fr)!important;
  gap:8px!important;
  padding:8px 8px 8px 8px!important;
}

.layout > aside{
  width:150px!important;
  min-width:150px!important;
  margin:0!important;
  padding:9px!important;
  gap:6px!important;
  border:1px solid rgba(56,210,255,.24)!important;
  border-radius:16px!important;
  background:
    linear-gradient(180deg,rgba(5,23,36,.99),rgba(2,13,22,.99))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 12px 34px rgba(0,0,0,.20),
    0 0 24px rgba(38,171,230,.035)!important;
  overflow:hidden!important;
}

/* Uniform icon + label treatment. Icons come from CSS so ES/EN text logic stays untouched. */
.nav{
  position:relative!important;
  min-height:45px!important;
  height:45px!important;
  padding:0 10px 0 39px!important;
  border-radius:11px!important;
  overflow:hidden!important;
}

.nav::before{
  content:'•';
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  border-radius:7px;
  color:#74ddff;
  background:
    linear-gradient(145deg,rgba(46,174,255,.18),rgba(112,75,255,.13));
  border:1px solid rgba(89,206,255,.23);
  box-shadow:inset 0 0 12px rgba(82,123,255,.05);
  font-size:12px;
  font-weight:900;
  line-height:1;
}

/* Module-specific symbols — compact, technical, consistent. */
.nav[data-view="dashboard"]::before{content:'⌁';}
.nav[data-view="explorer"]::before{content:'▦';}
.nav[data-view="radar"]::before{content:'◉';}
.nav[data-view="smart"]::before{content:'⇄';}
.nav[data-view="brain"]::before{content:'◇';}
.nav[data-view="news"]::before{content:'▤';}
.nav[data-view="journal"]::before{content:'✎';}
.nav[data-view="alerts"]::before{content:'!';}
.nav[data-view="account"]::before{content:'◒';}
.nav[data-view="projects"]::before{content:'◆';}
.nav[data-view="security"]::before{content:'⌾';}
.nav[data-view="voice"]::before{content:'◈';}

.nav:hover::before,
.nav.active::before{
  color:#dff7ff;
  border-color:rgba(100,224,255,.45);
  background:linear-gradient(145deg,rgba(41,191,255,.28),rgba(107,78,255,.22));
}

/* Voice Copilot gets brand priority: QLYRA cyan-violet identity. */
.nav[data-view="voice"]{
  margin-top:4px!important;
  color:#cddcff!important;
  border-color:rgba(112,102,255,.34)!important;
  background:
    linear-gradient(100deg,rgba(24,92,139,.34),rgba(58,46,128,.34))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 6px 16px rgba(31,38,92,.18)!important;
}

.nav[data-view="voice"]::before{
  color:#a6c4ff!important;
  border-color:rgba(111,112,255,.46)!important;
  background:
    linear-gradient(145deg,rgba(24,198,255,.25),rgba(116,74,255,.30))!important;
  box-shadow:0 0 13px rgba(85,93,255,.11)!important;
}

.nav[data-view="voice"]:hover,
.nav[data-view="voice"].active{
  color:#f1f4ff!important;
  border-color:rgba(104,213,255,.58)!important;
  background:
    linear-gradient(100deg,rgba(18,125,177,.55),rgba(79,52,160,.55))!important;
  box-shadow:
    inset 3px 0 #56ddff,
    0 8px 22px rgba(41,48,115,.23),
    0 0 20px rgba(96,87,255,.09)!important;
}

/* The header QLYRA voice shortcut gets the same high-priority brand signature. */
header .header-voice-btn{
  color:#d7e2ff!important;
  border-color:rgba(104,124,255,.52)!important;
  background:
    linear-gradient(110deg,rgba(15,111,159,.78),rgba(75,54,155,.80))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 5px 15px rgba(48,48,120,.16)!important;
}

header .header-voice-btn:hover{
  border-color:#79dcff!important;
  background:
    linear-gradient(110deg,rgba(17,142,190,.88),rgba(91,64,181,.90))!important;
  color:#ffffff!important;
  box-shadow:
    0 7px 19px rgba(50,62,145,.24),
    0 0 16px rgba(85,150,255,.10)!important;
}

/* Light theme preserves the frame and the special QLYRA identity. */
html[data-theme=light] .layout > aside{
  background:linear-gradient(180deg,#f8fcff,#eef6fb)!important;
  border-color:#b4d2e4!important;
  box-shadow:0 10px 28px rgba(20,70,100,.07)!important;
}

html[data-theme=light] .nav::before{
  color:#176d9d!important;
  background:linear-gradient(145deg,#e4f5fc,#eeeaff)!important;
  border-color:#b5d3e7!important;
}

html[data-theme=light] .nav[data-view="voice"]{
  color:#3f448d!important;
  border-color:#b5b9ec!important;
  background:linear-gradient(100deg,#e7f5fc,#efecff)!important;
}

html[data-theme=light] .nav[data-view="voice"]::before{
  color:#5055aa!important;
  border-color:#b7b9ed!important;
  background:linear-gradient(145deg,#dff5fd,#e8e3ff)!important;
}

html[data-theme=light] header .header-voice-btn{
  color:#334790!important;
  border-color:#a9b6ea!important;
  background:linear-gradient(110deg,#e5f6fd,#ece9ff)!important;
}

/* Keep the framed rail clean on shorter windows. */
@media(max-height:780px){
  .layout > aside{gap:5px!important;padding:8px!important}
  .nav{height:41px!important;min-height:41px!important}
}

/* ===== QLYRA B76 · TIGHTER LAYOUT + UNIFIED QLYRA NAV ===== */

/* Pull the left rail and the content together so the interface reads as one frame. */
.layout{
  grid-template-columns:150px minmax(0,1fr)!important;
  gap:2px!important;
  padding:6px 6px 6px 6px!important;
}

.layout > aside{
  width:146px!important;
  min-width:146px!important;
  margin:0!important;
  border-radius:15px!important;
}

.layout > main{
  padding:6px 4px 6px 4px!important;
  min-width:0!important;
}

/* Give the chart/content area more usable horizontal room. */
.terminal-grid{
  gap:5px!important;
}

/* All nav buttons now use the same cyan-violet QLYRA family. */
.nav{
  min-height:46px!important;
  height:46px!important;
  padding:0 10px 0 39px!important;
  margin:0!important;
  border-radius:11px!important;

  color:#7fe8ff!important;
  background:
    linear-gradient(105deg,
      rgba(18,95,137,.40) 0%,
      rgba(31,75,138,.32) 48%,
      rgba(78,53,146,.34) 100%)!important;

  border:1px solid rgba(89,152,255,.32)!important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 5px 14px rgba(0,0,0,.14)!important;

  font-size:12.5px!important;
  font-weight:850!important;
  letter-spacing:.01em!important;
}

/* Icon chips follow the same family. */
.nav::before{
  color:#74e5ff!important;
  background:
    linear-gradient(145deg,
      rgba(27,182,232,.26),
      rgba(89,67,190,.30))!important;
  border-color:rgba(95,168,255,.38)!important;
  box-shadow:
    inset 0 0 10px rgba(62,156,255,.06),
    0 0 10px rgba(77,88,210,.05)!important;
}

/* Hover: brighter, but still same design language. */
.nav:hover{
  transform:translateX(1px)!important;
  color:#a7f1ff!important;
  background:
    linear-gradient(105deg,
      rgba(18,123,165,.52) 0%,
      rgba(37,91,162,.43) 48%,
      rgba(86,59,162,.46) 100%)!important;
  border-color:rgba(104,206,255,.48)!important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 7px 17px rgba(0,0,0,.17),
    0 0 15px rgba(72,120,255,.06)!important;
}

/* Active: stronger cyan edge and slightly brighter violet depth. */
.nav.active{
  transform:none!important;
  color:#9ceeff!important;
  background:
    linear-gradient(105deg,
      rgba(13,143,182,.68) 0%,
      rgba(30,103,176,.58) 46%,
      rgba(89,57,174,.60) 100%)!important;

  border-color:rgba(105,225,255,.66)!important;

  box-shadow:
    inset 3px 0 #50e6ff,
    inset 0 1px 0 rgba(255,255,255,.06),
    0 8px 20px rgba(0,0,0,.20),
    0 0 18px rgba(71,121,255,.09)!important;
}

/* Remove the special isolation of Voice Copilot so every item belongs to one family. */
.nav[data-view="voice"]{
  margin-top:0!important;
  color:#7fe8ff!important;
  border-color:rgba(89,152,255,.32)!important;
  background:
    linear-gradient(105deg,
      rgba(18,95,137,.40) 0%,
      rgba(31,75,138,.32) 48%,
      rgba(78,53,146,.34) 100%)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 5px 14px rgba(0,0,0,.14)!important;
}

.nav[data-view="voice"]::before{
  color:#74e5ff!important;
  background:
    linear-gradient(145deg,
      rgba(27,182,232,.26),
      rgba(89,67,190,.30))!important;
  border-color:rgba(95,168,255,.38)!important;
}

.nav[data-view="voice"]:hover{
  color:#a7f1ff!important;
  border-color:rgba(104,206,255,.48)!important;
  background:
    linear-gradient(105deg,
      rgba(18,123,165,.52),
      rgba(37,91,162,.43),
      rgba(86,59,162,.46))!important;
}

.nav[data-view="voice"].active{
  color:#9ceeff!important;
  border-color:rgba(105,225,255,.66)!important;
  background:
    linear-gradient(105deg,
      rgba(13,143,182,.68),
      rgba(30,103,176,.58),
      rgba(89,57,174,.60))!important;
}

/* Keep the left frame compact and visually attached to Markets. */
.layout > aside{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    4px 0 12px rgba(0,0,0,.08),
    0 0 20px rgba(38,171,230,.025)!important;
}

/* Light mode matching. */
html[data-theme=light] .layout{
  gap:2px!important;
}

html[data-theme=light] .nav,
html[data-theme=light] .nav[data-view="voice"]{
  color:#1575a6!important;
  background:
    linear-gradient(105deg,#e8f7fd 0%,#e9f1ff 50%,#efeaff 100%)!important;
  border-color:#aec9e8!important;
  box-shadow:0 4px 12px rgba(40,80,120,.055)!important;
}

html[data-theme=light] .nav::before,
html[data-theme=light] .nav[data-view="voice"]::before{
  color:#187cae!important;
  background:linear-gradient(145deg,#dff7fd,#e9e4ff)!important;
  border-color:#b7c9ea!important;
}

html[data-theme=light] .nav:hover{
  color:#0a628f!important;
  background:
    linear-gradient(105deg,#dcf3fc 0%,#e2edff 50%,#e9e4ff 100%)!important;
  border-color:#8bb9dd!important;
}

html[data-theme=light] .nav.active{
  color:#075c8a!important;
  background:
    linear-gradient(105deg,#d3effa 0%,#dcecff 50%,#e7e1ff 100%)!important;
  border-color:#79abd6!important;
  box-shadow:
    inset 3px 0 #0879d9,
    0 6px 16px rgba(20,80,115,.08)!important;
}

/* Short screens: preserve the tight rhythm. */
@media(max-height:780px){
  .nav{
    min-height:42px!important;
    height:42px!important;
  }
  .layout > aside{
    gap:5px!important;
  }
}

/* ===== QLYRA B77 · LEFT COLUMN INTEGRATION POLISH ===== */
.layout{
  grid-template-columns:146px minmax(0,1fr)!important;
  gap:0!important;
  padding:6px!important;
}
.layout > aside{
  width:144px!important;
  min-width:144px!important;
  border-radius:14px 0 0 14px!important;
  border-right-color:rgba(56,210,255,.10)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),2px 0 10px rgba(0,0,0,.06)!important;
  z-index:2;
  position:relative!important;
}
.layout > main{
  padding:6px 4px 6px 0!important;
  margin-left:-1px!important;
}
.market-dock{
  border-radius:0 14px 14px 0!important;
  border-left-color:rgba(56,210,255,.12)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02),5px 0 18px rgba(0,0,0,.06)!important;
  padding-left:7px!important;
  padding-right:7px!important;
}
.terminal-grid{
  grid-template-columns:158px minmax(590px,1fr) 188px 216px!important;
  gap:4px!important;
}
.nav{
  color:#69ddff!important;
  text-shadow:0 0 9px rgba(58,191,255,.10);
}
.nav::before{
  color:#73e6ff!important;
  background:linear-gradient(145deg,rgba(24,185,235,.30),rgba(91,71,192,.34))!important;
  border-color:rgba(99,170,255,.42)!important;
}
.nav:hover{color:#8be8ff!important;}
.nav.active{
  color:#8cecff!important;
  text-shadow:0 0 11px rgba(65,211,255,.16);
}
.nav.active::before{
  color:#a5efff!important;
  background:linear-gradient(145deg,rgba(24,200,240,.38),rgba(102,77,207,.42))!important;
  box-shadow:0 0 13px rgba(87,117,255,.10),inset 0 0 12px rgba(255,255,255,.025)!important;
}
.layout > aside::after{
  content:'';
  position:absolute;
  top:16px;
  bottom:16px;
  right:-1px;
  width:1px;
  background:linear-gradient(180deg,transparent,rgba(68,211,255,.26) 12%,rgba(92,92,210,.20) 55%,rgba(68,211,255,.22) 88%,transparent);
  pointer-events:none;
}
.market-dock .title,
.market-dock .terminal-title{position:relative;}
.market-dock .title::before,
.market-dock .terminal-title::before{
  content:'';
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:2px;
  border-radius:999px;
  background:linear-gradient(180deg,#39ddff,#6f58d8);
  opacity:.78;
}
html[data-theme=light] .layout > aside{
  border-radius:14px 0 0 14px!important;
  border-right-color:#c1d8e5!important;
  box-shadow:2px 0 10px rgba(20,70,100,.04)!important;
}
html[data-theme=light] .market-dock{
  border-radius:0 14px 14px 0!important;
  border-left-color:#c8dce8!important;
  box-shadow:4px 0 16px rgba(20,70,100,.04)!important;
}
html[data-theme=light] .nav{
  color:#14749f!important;
  text-shadow:none!important;
}
html[data-theme=light] .nav.active{
  color:#075f8a!important;
  text-shadow:none!important;
}
@media(max-width:1250px){
  .terminal-grid{
    grid-template-columns:150px minmax(540px,1fr) 180px 208px!important;
  }
}

/* ===== QLYRA B78 · COMPACT LEFT RAIL + ALIGNMENT + SEARCH BORDER ===== */

/* Smaller left rail with a small clean separation from Markets. */
.layout{
  grid-template-columns:136px minmax(0,1fr)!important;
  gap:5px!important;
  padding:6px!important;
}

.layout > aside{
  width:132px!important;
  min-width:132px!important;
  margin:6px 0!important;
  padding:8px!important;
  gap:5px!important;
  border-radius:14px!important;
  border:1px solid rgba(56,210,255,.23)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 7px 22px rgba(0,0,0,.12)!important;
}

/* Align Markets with the top edge of the framed nav rail. */
.layout > main{
  padding:6px 4px 6px 0!important;
  margin-left:0!important;
}

.market-dock{
  border-radius:14px!important;
  border-left-color:rgba(56,210,255,.18)!important;
}

/* Smaller, cleaner navigation cards. */
.nav{
  min-height:40px!important;
  height:40px!important;
  padding:0 8px 0 34px!important;
  font-size:11.5px!important;
  border-radius:10px!important;
}

.nav::before{
  left:8px!important;
  width:19px!important;
  height:19px!important;
  border-radius:6px!important;
  font-size:10px!important;
}

/* Give the chart back a little more horizontal space. */
.terminal-grid{
  grid-template-columns:152px minmax(600px,1fr) 184px 210px!important;
  gap:5px!important;
}

/* Make the global search outline more visible without becoming loud. */
header .search,
#globalSearch{
  border:1px solid rgba(63,213,255,.42)!important;
  box-shadow:
    inset 0 0 0 1px rgba(46,133,255,.06),
    0 0 0 1px rgba(52,96,194,.08)!important;
}

header .search:focus,
#globalSearch:focus{
  outline:none!important;
  border-color:#51dfff!important;
  box-shadow:
    0 0 0 2px rgba(58,205,255,.13),
    0 0 18px rgba(78,90,210,.08)!important;
}

/* Light theme matching. */
html[data-theme=light] .layout > aside{
  border-color:#b8d4e4!important;
  box-shadow:0 6px 18px rgba(20,70,100,.06)!important;
}

html[data-theme=light] header .search,
html[data-theme=light] #globalSearch{
  border-color:#8fc4df!important;
  box-shadow:0 0 0 1px rgba(8,121,217,.07)!important;
}

@media(max-height:780px){
  .nav{
    min-height:37px!important;
    height:37px!important;
    font-size:11px!important;
  }
}

/* ===== QLYRA B79 · TRUE ALIGNMENT + COMPACT SEARCH + MARKET SCOPE ===== */

/* Equalize the visual gutter: nav→Markets = Markets→chart. */
.layout{
  grid-template-columns:136px minmax(0,1fr)!important;
  gap:5px!important;
  padding:6px!important;
}

.layout > aside{
  margin:0!important;
  align-self:stretch!important;
}

.layout > main{
  padding:0!important;
  margin:0!important;
}

.terminal-grid{
  margin:0!important;
  gap:5px!important;
  align-items:stretch!important;
}

/* Top alignment: rail, Markets and chart all begin on the same line. */
.layout > aside,
.market-dock,
.chart-card,
.terminal-chart-card,
.chart,
.main-chart{
  margin-top:0!important;
}

/* Reduce the header search substantially; it no longer dominates the header. */
header .search,
#globalSearch{
  flex:0 1 420px!important;
  width:420px!important;
  max-width:420px!important;
  min-width:260px!important;
}

/* Compact market-scope strip. */
.b79-market-scope{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  padding:7px 8px 6px;
  border-bottom:1px solid rgba(70,205,255,.10);
  background:rgba(2,14,24,.24);
}

.b79-market-scope button{
  min-height:25px;
  padding:4px 7px;
  border-radius:8px;
  border:1px solid rgba(77,169,223,.18);
  background:linear-gradient(180deg,rgba(9,31,45,.92),rgba(5,20,30,.96));
  color:#79dfff;
  font-size:9px;
  font-weight:800;
  letter-spacing:.015em;
  cursor:pointer;
}

.b79-market-scope button:hover{
  border-color:rgba(88,217,255,.38);
  color:#9eebff;
}

.b79-market-scope button.active-tool{
  border-color:rgba(95,222,255,.58);
  color:#a7efff;
  background:linear-gradient(105deg,rgba(19,111,153,.62),rgba(74,54,151,.55));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02),0 0 12px rgba(80,100,220,.07);
}

/* Light-theme equivalent. */
html[data-theme=light] .b79-market-scope{
  background:#f7fbfe;
  border-bottom-color:#d2e1ea;
}

html[data-theme=light] .b79-market-scope button{
  background:#f4f9fc;
  border-color:#bfd6e5;
  color:#176f9b;
}

html[data-theme=light] .b79-market-scope button.active-tool{
  background:linear-gradient(105deg,#dff4fb,#ebe7ff);
  border-color:#8cbcdc;
  color:#075e8b;
}

/* Responsive header fallback. */
@media(max-width:1250px){
  header .search,
  #globalSearch{
    flex-basis:340px!important;
    width:340px!important;
    max-width:340px!important;
  }
}

/* ===== QLYRA B80 · WIDE NAV + HEADER ORGANIZATION + FULLSCREEN CHART ===== */

/* Wider left menu so Oportunidades / Dinero Inteligente / Copiloto de Voz fit comfortably. */
.layout{
  grid-template-columns:150px minmax(0,1fr)!important;
  gap:5px!important;
  padding:6px!important;
}

.layout > aside{
  width:146px!important;
  min-width:146px!important;
  margin:0!important;
  padding:8px!important;
  border-radius:14px!important;
}

.nav{
  min-height:42px!important;
  height:42px!important;
  padding:0 9px 0 36px!important;
  font-size:11.8px!important;
  line-height:1.08!important;
}

.nav::before{
  left:8px!important;
}

/* Keep equal gutter: nav→Markets and Markets→chart. */
.terminal-grid{
  gap:5px!important;
  align-items:stretch!important;
}

/* Header organization */
header{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:8px 12px!important;
}

.b80-header-left,
.b80-header-right{
  display:flex;
  align-items:center;
  gap:8px;
}

.b80-header-left{
  flex:1 1 auto;
  min-width:0;
}

.b80-header-right{
  flex:0 0 auto;
  margin-left:auto;
}

.b80-header-left .brand{
  min-width:190px!important;
  flex:0 0 190px!important;
}

.b80-header-left .brand .logo{
  font-size:34px!important;
}

.b80-header-left .brand b{
  font-size:14px!important;
  letter-spacing:3.5px!important;
}

.b80-header-left .header-voice-btn{
  min-width:90px!important;
  height:36px!important;
}

.b80-header-left #globalSearch{
  flex:0 1 330px!important;
  width:330px!important;
  max-width:330px!important;
  min-width:230px!important;
  height:36px!important;
  border:1px solid rgba(72,218,255,.52)!important;
  box-shadow:inset 0 0 0 1px rgba(83,98,220,.07)!important;
}

.b80-header-left #globalSearch:focus{
  border-color:#64e2ff!important;
  box-shadow:
    0 0 0 2px rgba(65,206,255,.13),
    0 0 16px rgba(86,91,210,.09)!important;
  outline:none!important;
}

.b80-header-right .theme-switch,
.b80-header-right .lang-switch{
  margin:0!important;
  gap:4px!important;
}

.b80-header-right .theme-switch button,
.b80-header-right .lang-switch button,
.b80-header-right #logoutBtn,
.b80-header-right .role-pill{
  height:36px!important;
}

/* Market scope: larger and arranged downward using the available Market dock height. */
.b79-market-scope{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;
  padding:8px!important;
}

.b79-market-scope button{
  min-height:30px!important;
  padding:5px 7px!important;
  font-size:10px!important;
  border-radius:9px!important;
}

/* Order book/readability: make typography slightly larger. */
.orderbook-panel .title,
.orderbook-panel .terminal-title{
  font-size:14px!important;
  line-height:1.08!important;
}

.orderbook-panel .book-head{
  font-size:9.5px!important;
}

.orderbook-panel .book-rows{
  font-size:10px!important;
}

.orderbook-panel .book-mid b{
  font-size:15px!important;
}

/* Right trading controls get a little more visual size and vertical rhythm. */
.trade-panel{
  padding:8px!important;
}

.trade-tabs,
.trade-select-row,
.order-type-tabs{
  gap:6px!important;
  margin-bottom:7px!important;
}

.trade-tabs button,
.trade-select-row button,
.order-type-tabs button{
  min-height:31px!important;
  font-size:10.5px!important;
  border-radius:9px!important;
}

.trade-select-row{
  grid-template-columns:1fr 1fr!important;
}

.quick-size button{
  min-height:29px!important;
  font-size:9.5px!important;
}

/* Fullscreen chart */
#priceChart{
  position:relative!important;
}

.b80-fullscreen-btn{
  position:absolute;
  top:8px;
  right:8px;
  z-index:50;
  width:34px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:9px;
  border:1px solid rgba(78,205,255,.34);
  background:linear-gradient(110deg,rgba(12,68,96,.88),rgba(66,48,137,.88));
  color:#9eeeff;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.16);
}

.b80-fullscreen-btn:hover{
  color:#fff;
  border-color:#6be6ff;
  transform:translateY(-1px);
}

#priceChart:fullscreen{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  border-radius:0!important;
  background:#020912!important;
}

#priceChart:fullscreen iframe,
#priceChart:fullscreen canvas,
#priceChart:fullscreen .tv-lightweight-charts{
  width:100%!important;
  height:100%!important;
}

html[data-theme=light] .b80-fullscreen-btn{
  background:linear-gradient(110deg,#e5f6fd,#ece9ff)!important;
  color:#176f9f!important;
  border-color:#9abfdf!important;
}

@media(max-width:1250px){
  .b80-header-left .brand{
    min-width:160px!important;
    flex-basis:160px!important;
  }
  .b80-header-left #globalSearch{
    width:280px!important;
    max-width:280px!important;
    flex-basis:280px!important;
  }
}

/* ===== QLYRA B81 · FUNCTIONAL POLISH ===== */

/* Fullscreen control now lives in the chart toolbar, never over chart text/candles. */
.b81-toolbar-fullscreen{
  min-width:32px!important;
  width:32px!important;
  height:28px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border-radius:8px!important;
  border:1px solid rgba(83,205,255,.30)!important;
  background:linear-gradient(110deg,rgba(12,65,94,.86),rgba(63,48,133,.84))!important;
  color:#91eaff!important;
  font-size:14px!important;
  line-height:1!important;
}

.b81-toolbar-fullscreen:hover{
  color:#fff!important;
  border-color:#6ee6ff!important;
}

/* Fullscreen the complete chart terminal: pair metrics + controls + chart, nothing else. */
.chart-terminal:fullscreen{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:8px!important;
  border-radius:0!important;
  background:#020912!important;
  display:flex!important;
  flex-direction:column!important;
}

.chart-terminal:fullscreen #priceChart{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
}

.chart-terminal:fullscreen #tradingViewChart,
.chart-terminal:fullscreen .qlyra-tv-widget,
.chart-terminal:fullscreen iframe{
  height:100%!important;
  min-height:0!important;
}

/* Functional global search suggestions */
.b81-search-wrap{
  position:relative;
  flex:0 1 330px;
  width:330px;
  max-width:330px;
  min-width:230px;
}

.b81-search-wrap #globalSearch{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  flex:none!important;
}

.b81-search-suggestions{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:999;
  padding:6px;
  border-radius:11px;
  border:1px solid rgba(70,204,255,.25);
  background:rgba(3,15,25,.98);
  box-shadow:0 14px 34px rgba(0,0,0,.34);
}

.b81-search-suggestion{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:34px;
  padding:7px 9px;
  border-radius:8px;
  border:0;
  background:transparent;
  color:#dff7ff;
  text-align:left;
  font-size:11px;
  cursor:pointer;
}

.b81-search-suggestion:hover,
.b81-search-suggestion.active{
  background:linear-gradient(90deg,rgba(20,105,147,.48),rgba(72,55,150,.40));
  color:#8ceaff;
}

.b81-search-suggestion small{
  color:#6f91a6;
  font-size:9px;
}

html[data-theme=light] .b81-toolbar-fullscreen{
  background:linear-gradient(110deg,#e4f5fc,#ece9ff)!important;
  border-color:#a0c3df!important;
  color:#176f9f!important;
}

html[data-theme=light] .b81-search-suggestions{
  background:#fff;
  border-color:#bdd6e6;
  box-shadow:0 12px 28px rgba(20,70,100,.13);
}

html[data-theme=light] .b81-search-suggestion{
  color:#21465f;
}

html[data-theme=light] .b81-search-suggestion:hover,
html[data-theme=light] .b81-search-suggestion.active{
  background:linear-gradient(90deg,#e4f4fb,#eeeaff);
  color:#075f8b;
}

@media(max-width:1250px){
  .b81-search-wrap{
    width:280px;
    max-width:280px;
    flex-basis:280px;
  }
}

/* ===== QLYRA B82 · FUNCTIONAL STATE MARKERS ===== */
.b82-exec-stage{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding:6px 7px;
  margin-bottom:7px;
  border:1px solid rgba(255,190,75,.18);
  border-radius:8px;
  background:rgba(255,176,53,.045);
  font-size:8px;
  letter-spacing:.06em;
}
.b82-exec-stage span{color:#829bad}
.b82-exec-stage b{color:#ffc66f;font-size:8px}

/* ===== QLYRA B83 · ORDER ENTRY CORE ===== */
.b83-empty-position{
  padding:14px 10px;
  text-align:center;
  color:#66879a;
  font-size:10px;
  border-top:1px solid rgba(70,145,180,.08);
}
.b83-order-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
}
.b83-order-actions .mini-action,
.b83-order-actions .cancel-demo-order{
  min-height:26px;
  padding:4px 7px;
  font-size:9px;
  border-radius:7px;
}
.b83-fill-demo-order{
  border:1px solid rgba(48,220,193,.28)!important;
  color:#72f4d7!important;
  background:rgba(30,168,145,.08)!important;
}
.b83-position-pnl{
  color:#89a9bb!important;
  font-size:9px!important;
}
.b83-reset-demo{
  margin:9px 10px 10px;
  min-height:30px;
}

/* B84: compact catalog status and instrument details use inherited theme colors. */
.b84-catalog-status{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;font-size:10px;color:inherit;opacity:.85}
.b84-catalog-status button{color:inherit;background:transparent;border:1px solid currentColor;border-radius:4px;cursor:pointer}
.b84-instrument-meta{font-size:10px;line-height:1.5;margin:6px 0;overflow-wrap:anywhere}
.b84-instrument-meta summary{cursor:pointer}
#b84DemoNote{display:block;font-size:10px;opacity:.8;margin:5px 0}

/* ===== QLYRA B86 · ORDER BOOK VISIBILITY + MULTI-MARKET ===== */
.orderbook-panel{
  overflow:hidden!important;
}
.book-side-label{
  padding:4px 8px 3px;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  border-bottom:1px solid rgba(60,120,150,.12);
}
.book-side-label.sell-side{color:#ff7187;background:rgba(255,79,109,.045)}
.book-side-label.buy-side{color:#38e6ae;background:rgba(30,229,164,.04)}
.book-rows{
  flex:1 1 0!important;
  min-height:96px!important;
  overflow:hidden!important;
  justify-content:center;
}
.book-row{
  min-height:17px!important;
  padding:3px 8px!important;
  font-size:9.5px!important;
}
.book-head{
  font-size:9.5px!important;
  font-weight:700;
}
.b84-book-note{
  min-height:88px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#6f8b9e;
  padding:10px;
  font-size:9px;
}

/* ===== QLYRA B87 · MOBILE FOUNDATION ===== */
.b87-empty,.b87-book-message{
  min-height:90px;display:grid;place-items:center;text-align:center;padding:10px;color:#6f8b9e;font-size:9px;
}
@media (max-width: 900px){
  body{overflow:auto!important}
  .app-shell,.shell,.app{min-width:0!important;width:100%!important}
  header,.topbar{position:sticky;top:0;z-index:40}
  .layout{display:block!important}
  .layout>aside{
    position:sticky!important;top:52px!important;z-index:35!important;
    width:100%!important;max-width:none!important;height:auto!important;
    display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;
    gap:6px!important;padding:7px!important;border-radius:0!important
  }
  .layout>aside .nav{flex:0 0 auto!important;min-width:112px!important}
  main{width:100%!important;min-width:0!important;padding:7px!important}
  .terminal-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:
      "markets"
      "chart"
      "book"
      "trade"
      "positions"!important;
    height:auto!important;min-height:0!important;gap:8px!important
  }
  .market-dock{grid-area:markets!important;max-height:390px!important}
  .chart-panel{grid-area:chart!important;min-height:430px!important}
  .orderbook-panel{grid-area:book!important;min-height:430px!important}
  .trade-panel{grid-area:trade!important;min-height:auto!important}
  .positions-panel{grid-area:positions!important;min-height:300px!important}
  .b79-market-scope{display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:4px}
  .b79-market-scope button{flex:0 0 auto!important}
  .terminal-market-list{max-height:260px!important;overflow-y:auto!important}
}
@media (max-width: 560px){
  .topbar,.header{gap:5px!important;padding:6px!important}
  .brand-title,.brand-subtitle{display:none!important}
  .global-search,.b81-search-wrap{min-width:0!important;flex:1!important}
  .chart-panel{min-height:360px!important}
  .orderbook-panel{min-height:390px!important}
  .book-row{font-size:10px!important;padding:4px 8px!important}
  .trade-actions button{min-height:46px!important}
}

/* ===== QLYRA B88 · ISOLATED MASTER / MOBILE PHASE 2 ===== */
#b88RuntimeRibbon{
  position:fixed;right:8px;bottom:8px;z-index:99999;
  padding:5px 8px;border:1px solid rgba(56,223,255,.45);
  border-radius:999px;background:rgba(2,14,24,.92);
  color:#38dfff;font:700 9px/1.1 system-ui;letter-spacing:.06em;
  pointer-events:none;box-shadow:0 0 18px rgba(56,223,255,.12);
}
#qlyraBuildBadge{
  color:#7ff3ff!important;border-color:#2e9cc5!important;
  background:rgba(28,158,194,.10)!important;font-weight:800!important;
}
@media (max-width:900px){
  #b88RuntimeRibbon{bottom:6px;right:6px;font-size:8px}
  header{min-height:50px!important}
  .header-left,.header-right{min-width:0!important}
  .header-right{display:flex!important;overflow-x:auto!important;white-space:nowrap!important}
  .market-dock,.chart-panel,.orderbook-panel,.trade-panel,.positions-panel{
    border-radius:10px!important;
  }
  .orderbook-panel .book-rows{min-height:120px!important}
}
@media (max-width:560px){
  .layout>aside .nav{min-width:104px!important}
  .terminal-title{font-size:11px!important}
  .market-item{min-height:44px!important}
  .market-item b{font-size:11px!important}
  .market-item small{font-size:9px!important}
  .book-side-label{font-size:9px!important;padding:6px 8px!important}
  .book-row{font-size:10.5px!important;min-height:19px!important}
  .trade-panel input,.trade-panel button{font-size:12px!important}
  .trade-actions button{min-height:48px!important}
}

/* ===== QLYRA B89 · RESTORED INDIVIDUAL MARKET MODALS ===== */
.b89-market-modal{position:fixed;inset:0;z-index:100000;display:grid;place-items:center}
.b89-market-modal.hidden{display:none!important}
.b89-backdrop{position:absolute;inset:0;background:rgba(0,8,15,.78);backdrop-filter:blur(8px)}
.b89-dialog{
  position:relative;z-index:1;width:min(760px,calc(100vw - 28px));height:min(690px,calc(100vh - 44px));
  display:flex;flex-direction:column;gap:12px;padding:18px;
  border:1px solid #15527b;border-radius:16px;background:#061522;
  box-shadow:0 28px 80px rgba(0,0,0,.55)
}
.b89-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.b89-modal-head small{display:block;color:#6e91a9;font-size:9px;letter-spacing:.18em;margin-bottom:6px}
.b89-modal-head h2{margin:0;font-size:22px;color:#eaf7ff}
#b89Close{width:38px;height:38px;border:1px solid #285e80;border-radius:10px;background:#071b2a;color:#eaf7ff;font-size:24px}
.b89-modal-tabs{display:flex;gap:8px}
.b89-modal-tabs button{padding:6px 10px;border:1px solid #1c5678;border-radius:8px;background:#071b2a;color:#b7d4e6;font-size:10px}
.b89-modal-tabs button.active-tool{border-color:#42cfff;color:#fff;background:rgba(56,223,255,.09)}
#b89Search{width:100%;padding:11px 12px;border:1px solid #27719a;border-radius:10px;background:#04111c;color:#fff;outline:none}
#b89Search:focus{border-color:#52c9ff;box-shadow:0 0 0 2px rgba(82,201,255,.12)}
.b89-modal-status{display:flex;align-items:center;justify-content:space-between;color:#82a2b7;font-size:10px}
.b89-modal-status span{color:#72e6ff}.b89-modal-status b{font-weight:700}
.b89-modal-cols{display:grid;grid-template-columns:1fr auto;padding:7px 8px;border-top:1px solid #11364e;border-bottom:1px solid #11364e;color:#68879c;font-size:9px;letter-spacing:.08em}
.b89-modal-rows{flex:1;min-height:0;overflow-y:auto}
.b89-row{width:100%;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:10px 8px;border:0;border-bottom:1px solid rgba(52,111,145,.14);background:transparent;color:#dff4ff;text-align:left}
.b89-row:hover{background:rgba(44,190,237,.07)}
.b89-row span{display:flex;flex-direction:column;gap:3px}.b89-row b{font-size:12px}.b89-row small{font-size:9px;color:#6f91a8}
.b89-row em{font-style:normal;color:#6fe7ff;font-size:9px;font-weight:700}
.b89-empty,.b89-book-note{min-height:110px;display:grid;place-items:center;text-align:center;color:#6f8b9e;padding:14px}
#b88RuntimeRibbon{display:none!important}
#b89RuntimeRibbon{display:block}
@media(max-width:700px){
  .b89-dialog{width:calc(100vw - 14px);height:calc(100vh - 20px);padding:14px;border-radius:12px}
  .b89-modal-head h2{font-size:19px}
  .b89-row{padding:12px 6px}
}

/* ===== QLYRA B90 · COMPACT MARKET SUBMENUS ===== */
.market-dock .market-tabs,
.market-dock .market-search,
.market-dock .market-head,
.market-dock .terminal-market-list,
.market-dock .b84-catalog-status{
  display:none!important;
}
.b90-current-market{
  margin-top:8px;padding:8px 9px;border:1px solid rgba(44,117,153,.32);
  border-radius:10px;background:rgba(4,20,32,.72);
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:7px;
  min-height:42px;
}
.b90-current-market span{font-size:7px;letter-spacing:.12em;color:#5e8299;font-weight:800}
.b90-current-market b{font-size:10px;color:#e2f6ff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.b90-current-market em{font-style:normal;font-size:8px;color:#54dfff;font-weight:800}
.b90-market-submenu{
  position:fixed;z-index:120000;display:flex;flex-direction:column;gap:8px;
  min-width:300px;max-height:520px;padding:12px;
  border:1px solid #175577;border-radius:12px;background:#061522;
  box-shadow:0 20px 54px rgba(0,0,0,.58),0 0 0 1px rgba(35,160,210,.06);
}
.b90-market-submenu.hidden{display:none!important}
.b90-sub-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.b90-sub-head div{display:flex;flex-direction:column;gap:2px}
.b90-sub-head small{font-size:7px;letter-spacing:.15em;color:#688ba3}
.b90-sub-head b{font-size:15px;color:#e5f7ff}
#b90SubClose{
  width:28px;height:28px;border:1px solid #285c79;border-radius:8px;
  background:#071a28;color:#eaf8ff;font-size:18px;line-height:1
}
#b90SubSearch{
  width:100%;padding:9px 10px;border:1px solid #226e95;border-radius:8px;
  background:#04111b;color:#fff;outline:none;font-size:10px
}
#b90SubSearch:focus{border-color:#4fcfff;box-shadow:0 0 0 2px rgba(79,207,255,.10)}
.b90-sub-meta{display:flex;align-items:center;justify-content:space-between;font-size:8px;color:#6e90a7}
.b90-sub-meta span{color:#64e3ff;font-weight:800}.b90-sub-meta em{font-style:normal}
.b90-sub-rows{min-height:80px;overflow-y:auto;border-top:1px solid rgba(50,106,136,.24)}
.b90-sub-row{
  width:100%;display:grid;grid-template-columns:1fr auto;align-items:center;gap:9px;
  padding:9px 6px;border:0;border-bottom:1px solid rgba(50,106,136,.16);
  background:transparent;color:#e4f7ff;text-align:left
}
.b90-sub-row:hover{background:rgba(46,191,237,.07)}
.b90-sub-row span{display:flex;flex-direction:column;gap:2px}
.b90-sub-row b{font-size:10px}.b90-sub-row small{font-size:8px;color:#6d91a8}
.b90-sub-row em{font-style:normal;font-size:8px;color:#5fe6ff;font-weight:800}
.b90-sub-empty,.b90-book-note{min-height:90px;display:grid;place-items:center;text-align:center;color:#6d8ca0;padding:10px;font-size:9px}
#b89RuntimeRibbon,#b88RuntimeRibbon{display:none!important}
#b90RuntimeRibbon{display:block}
@media(max-width:560px){
  .b90-market-submenu{
    left:8px!important;right:8px!important;top:72px!important;width:auto!important;
    max-height:calc(100vh - 88px)!important;
  }
  .b90-current-market{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"a b" "a c"}
  .b90-current-market span{grid-area:a}.b90-current-market b{grid-area:b}.b90-current-market em{grid-area:c}
}

/* ===== QLYRA B91 · TRUE FLOATING SUBMENUS ===== */
.market-dock{position:relative!important;overflow:visible!important}
.b91-legacy-hidden{display:none!important}
.b79-market-scope button.submenu-open{
  border-color:#52cfff!important;color:#fff!important;background:rgba(52,199,255,.14)!important;
  box-shadow:0 0 0 1px rgba(82,207,255,.10),0 6px 18px rgba(0,0,0,.25)
}
.b91-market-submenu{
  position:absolute;z-index:50000;display:flex;flex-direction:column;gap:8px;
  min-width:300px;max-height:500px;padding:11px;border:1px solid #1f6f94;border-radius:12px;
  background:#061522;box-shadow:0 22px 56px rgba(0,0,0,.60),0 0 22px rgba(36,178,226,.08)
}
.b91-market-submenu.hidden{display:none!important}
.b91-sub-arrow{
  position:absolute;top:-6px;left:28px;width:11px;height:11px;background:#061522;
  border-left:1px solid #1f6f94;border-top:1px solid #1f6f94;transform:rotate(45deg)
}
.b91-sub-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.b91-sub-head div{display:flex;flex-direction:column;gap:2px}
.b91-sub-head small{font-size:7px;letter-spacing:.14em;color:#668da7}
.b91-sub-head b{font-size:14px;color:#e8f8ff}
#b91Close{
  width:27px;height:27px;border:1px solid #2a607d;border-radius:8px;background:#071a29;
  color:#fff;font-size:17px;line-height:1
}
.b91-search-wrap{display:block!important}
#b91Search{
  width:100%;padding:8px 9px;border:1px solid #23739a;border-radius:8px;background:#04111c;
  color:#fff;font-size:10px;outline:none
}
#b91Search:focus{border-color:#52ccff;box-shadow:0 0 0 2px rgba(82,204,255,.10)}
.b91-meta{display:flex;justify-content:space-between;align-items:center;color:#6c91a7;font-size:8px}
.b91-meta span{color:#64e7ff;font-weight:800}.b91-meta em{font-style:normal}
.b91-rows{overflow-y:auto;min-height:80px;border-top:1px solid rgba(58,121,151,.22)}
.b91-row{
  width:100%;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;
  padding:9px 6px;border:0;border-bottom:1px solid rgba(57,119,149,.15);background:transparent;
  color:#e4f8ff;text-align:left
}
.b91-row:hover{background:rgba(52,196,240,.08)}
.b91-row span{display:flex;flex-direction:column;gap:2px}
.b91-row b{font-size:10px}.b91-row small{font-size:8px;color:#7095aa}
.b91-row em{font-style:normal;color:#61e8ff;font-size:8px;font-weight:800}
.b91-empty,.b91-book-note{min-height:88px;display:grid;place-items:center;text-align:center;color:#6f8fa2;font-size:9px;padding:10px}
#b90RuntimeRibbon,#b89RuntimeRibbon,#b88RuntimeRibbon{display:none!important}
#b92RuntimeRibbon{display:block}
@media(max-width:900px){
  .market-dock{overflow:visible!important}
}
@media(max-width:560px){
  .b91-market-submenu{
    position:fixed!important;left:8px!important;right:8px!important;top:72px!important;width:auto!important;
    max-height:calc(100vh - 88px)!important;
  }
  .b91-sub-arrow{display:none}
}

/* B92 source-fix marker */
#b92RuntimeRibbon{
  display:block!important;
  position:fixed;right:8px;bottom:8px;z-index:99999;
  padding:5px 8px;border:1px solid rgba(56,223,255,.45);
  border-radius:999px;background:rgba(2,14,24,.94);
  color:#38dfff;font:800 9px/1 system-ui;letter-spacing:.06em;
  pointer-events:none;
}

/* ===== QLYRA B93 · TRUE CENTERED MODAL ===== */
.b93-hidden{display:none!important}
.b93-modal{position:fixed;inset:0;z-index:200000;display:grid;place-items:center}
.b93-modal.hidden{display:none!important}
.b93-backdrop{position:absolute;inset:0;background:rgba(0,7,14,.78);backdrop-filter:blur(8px)}
.b93-card{
  position:relative;z-index:1;width:min(720px,calc(100vw - 40px));height:min(650px,calc(100vh - 60px));
  display:flex;flex-direction:column;gap:12px;padding:18px;border:1px solid #1b6288;
  border-radius:16px;background:#061522;box-shadow:0 30px 90px rgba(0,0,0,.65)
}
.b93-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.b93-head small{display:block;font-size:8px;letter-spacing:.16em;color:#688da5;margin-bottom:5px}
.b93-head h2{margin:0;color:#ecf9ff;font-size:22px}
#b93Close{width:38px;height:38px;border:1px solid #2b6686;border-radius:10px;background:#071a29;color:#fff;font-size:24px}
.b93-tabs{display:flex;gap:7px}
.b93-tabs button{padding:6px 10px;border:1px solid #245d7a;border-radius:8px;background:#071a28;color:#a9c9dc;font-size:9px}
.b93-tabs button.active-tool{border-color:#4dccff;color:#fff;background:rgba(77,204,255,.10)}
#b93Search{width:100%;padding:11px 12px;border:1px solid #2a7399;border-radius:10px;background:#04111c;color:#fff;outline:none}
#b93Search:focus{border-color:#52cfff;box-shadow:0 0 0 2px rgba(82,207,255,.10)}
.b93-status{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#7294a8}
.b93-status span{color:#63e6ff;font-weight:800}
.b93-cols{display:grid;grid-template-columns:1fr auto;padding:7px 8px;border-top:1px solid #153b51;border-bottom:1px solid #153b51;color:#6b899d;font-size:8px;letter-spacing:.08em}
.b93-rows{flex:1;min-height:0;overflow-y:auto}
.b93-row{width:100%;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:10px 8px;border:0;border-bottom:1px solid rgba(57,121,151,.16);background:transparent;color:#e4f7ff;text-align:left}
.b93-row:hover{background:rgba(51,190,234,.08)}
.b93-row span{display:flex;flex-direction:column;gap:3px}.b93-row b{font-size:11px}.b93-row small{font-size:8px;color:#6f91a7}
.b93-row em{font-style:normal;font-size:8px;color:#61e8ff;font-weight:800}
.b93-empty{min-height:110px;display:grid;place-items:center;text-align:center;color:#6d8da1;padding:12px}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon{display:none!important}
#b93RuntimeRibbon{display:block!important}
@media(max-width:600px){
  .b93-card{width:calc(100vw - 16px);height:calc(100vh - 24px);padding:14px;border-radius:12px}
  .b93-head h2{font-size:19px}
}

/* ===== QLYRA B94 · SESSION / MODULE CORE ===== */
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon{display:none!important}
#b94RuntimeRibbon{
  display:block!important;position:fixed;right:8px;bottom:8px;z-index:99999;
  padding:5px 8px;border:1px solid rgba(56,223,255,.40);border-radius:999px;
  background:rgba(2,14,24,.94);color:#38dfff;font:800 9px/1 system-ui;
  letter-spacing:.05em;pointer-events:none
}

/* ===== QLYRA B95 · AI COPILOT CORE ===== */
.voice-conversation-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.b95-copilot-form{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:8px}
.b95-copilot-form input{min-width:0;padding:9px 10px;border:1px solid #1f6385;border-radius:8px;background:#04111b;color:#eaf8ff;outline:none}
.b95-copilot-form input:focus{border-color:#4dd8ff;box-shadow:0 0 0 2px rgba(77,216,255,.10)}
.b95-copilot-form button{padding:8px 12px;border:1px solid #1f85af;border-radius:8px;background:linear-gradient(135deg,#0879a8,#11b6d6);color:white;font-weight:800}
.b95-draft-order{margin-top:9px;padding:10px;border:1px solid rgba(255,179,52,.32);border-radius:10px;background:rgba(255,179,52,.045)}
.b95-draft-order>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:8px}
.b95-draft-order span{font-size:8px;letter-spacing:.09em;color:#d5a343;font-weight:800}
.b95-draft-order b{color:#fff;font-size:11px}
.b95-draft-order p{margin:8px 0;color:#9fc1d3;font-size:9px;line-height:1.5}
.b95-draft-order>div:nth-of-type(2){display:flex;gap:6px}
.b95-draft-order small{display:block;margin-top:8px;color:#6d8b9d;font-size:8px}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon{display:none!important}
#b95RuntimeRibbon{display:block!important}

/* ===== QLYRA B96 · CONVERSATIONAL COPILOT ===== */
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon{display:none!important}
#b96RuntimeRibbon{display:block!important}
#voiceContinuousToggle:checked{accent-color:#1ed7c0}

/* ===== QLYRA B97 · VOICE LOOP ===== */
.b97-conversation-state{
  margin-top:-4px;padding:5px 8px;border:1px solid rgba(51,195,222,.22);border-radius:7px;
  color:#6ea8bd;background:rgba(5,25,37,.55);font-size:8px;font-weight:800;letter-spacing:.08em;text-align:center
}
#voiceContinuousToggle:checked + *{color:#54e7cf}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon{display:none!important}
#b97RuntimeRibbon{display:block!important}

/* ===== QLYRA B98 · EXECUTION READINESS ===== */
.b98-execution-readiness{margin-bottom:12px}
.b98-readiness-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.b98-readiness-grid>div{padding:9px 10px;border:1px solid rgba(52,118,150,.22);border-radius:9px;background:rgba(4,20,31,.58)}
.b98-readiness-grid span{display:block;color:#668ca3;font-size:8px;letter-spacing:.07em;text-transform:uppercase}
.b98-readiness-grid b{display:block;margin-top:4px;color:#dff8ff;font-size:10px}
.b98-readiness-actions{display:flex;gap:8px;margin-top:10px}
.b98-readiness-details{margin-top:10px;padding:9px 10px;border:1px solid rgba(48,126,160,.20);border-radius:8px;color:#7fa4b7;background:rgba(4,16,26,.42);font-size:9px;line-height:1.45}
.b98-trade-readiness{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;padding:6px 8px;border:1px solid rgba(52,130,165,.22);border-radius:8px;background:rgba(4,18,28,.52);margin:6px 0}
.b98-trade-readiness span{font-size:7px;color:#628ba3;letter-spacing:.08em}.b98-trade-readiness b{font-size:8px;color:#73e8cf}.b98-trade-readiness em{font-style:normal;font-size:7px;color:#f0b45c;font-weight:800}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon{display:none!important}
#b98RuntimeRibbon{display:block!important}
@media(max-width:700px){.b98-readiness-grid{grid-template-columns:1fr 1fr}}

/* ===== QLYRA B99 · SECURITY SCROLL FIX + EXECUTION BACKEND ===== */
.qlyra-security-view{
  height:auto!important;
  min-height:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:28px!important
}
.qlyra-security-view .security-shell{
  height:auto!important;
  min-height:100%!important;
  align-items:start!important
}
.qlyra-security-view .security-main{
  overflow:visible!important;
  min-height:0!important
}
.qlyra-security-view .security-side{
  overflow:visible!important;
  min-height:0!important;
  position:sticky!important;
  top:0!important
}
.b99-exec-control{margin:12px 0 0;padding:12px;border-top:1px solid rgba(56,223,255,.12)}
.b99-exec-control-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.b99-exec-control-head div span{display:block;font-size:8px;letter-spacing:.12em;color:#56dfff;font-weight:800}
.b99-exec-control-head div b{display:block;margin-top:2px;color:#dff8ff;font-size:11px}
.b99-exec-control-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.b99-exec-control-grid>div,.b99-exec-control-grid label{padding:8px 9px;border:1px solid rgba(54,126,157,.20);border-radius:8px;background:rgba(3,17,27,.55)}
.b99-exec-control-grid span{display:block;color:#668da3;font-size:7px;text-transform:uppercase;letter-spacing:.06em}
.b99-exec-control-grid b{display:block;color:#dff7ff;font-size:9px;margin-top:4px}
.b99-exec-control-grid select{width:100%;margin-top:4px;padding:6px;border:1px solid rgba(62,139,173,.25);border-radius:7px;background:#061725;color:#dff8ff;font-size:9px}
.b99-never{color:#ff7c90!important}
.b99-exec-actions{display:flex;gap:7px;margin-top:8px}
#b99ExecHelp{margin:8px 0 0;color:#7798aa;font-size:8px;line-height:1.4}
.b99-terminal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line)}
.b99-terminal-head .positions-tabs{border-bottom:0!important;flex:1}
.b99-terminal-mode{display:flex;align-items:center;gap:5px;padding:5px 8px}
.b99-terminal-mode button{padding:5px 7px;border:1px solid rgba(55,128,160,.24);border-radius:7px;background:#061725;color:#86a7b9;font-size:8px}
.b99-terminal-mode span{padding:5px 7px;border:1px solid rgba(56,223,255,.18);border-radius:7px;color:#66e5ff;font-size:8px;font-weight:800}
.b99-private-panel{min-height:170px}
.b99-private-head{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-bottom:1px solid rgba(56,223,255,.10);font-size:8px;color:#6d93a8}
.b99-private-head b{color:#73e7cf}
.b99-private-rows{min-height:120px}
.b99-private-row{display:grid;grid-template-columns:1.2fr .8fr .8fr .9fr .8fr;gap:8px;align-items:center;padding:8px 10px;border-bottom:1px solid rgba(56,223,255,.08);font-size:9px}
.b99-private-row b{color:#dff8ff}.b99-private-row span{color:#89a8b8}.b99-private-row em{font-style:normal;color:#67e6cb}
.b99-private-empty{display:grid;place-items:center;min-height:120px;color:#6e8e9f;font-size:9px;text-align:center;padding:12px}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon{display:none!important}
#b99RuntimeRibbon{display:block!important}
@media(max-width:900px){
  .qlyra-security-view .security-shell{grid-template-columns:1fr!important}
  .qlyra-security-view .security-side{position:static!important}
  .b99-exec-control-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .b99-exec-control-grid{grid-template-columns:1fr}
  .b99-terminal-head{align-items:flex-start;flex-direction:column}
  .b99-private-row{grid-template-columns:1fr 1fr}
}

/* ===== QLYRA B100 · SECURITY FULL-PAGE SCROLL ROOT FIX ===== */
/* Desktop legacy B9 made main height:100% + overflow:hidden. Security is taller than
   one screen, so B99's child-only overflow rules could never expose the bottom.
   B100 makes MAIN the vertical scroller only while Security is active. */
@media (min-width:1200px){
  main.b100-security-scroll{
    height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain;
    scrollbar-gutter:stable;
    padding-bottom:24px!important;
  }

  main.b100-security-scroll #security.qlyra-security-view{
    display:block;
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;
    overflow:visible!important;
    padding-bottom:72px!important;
  }

  main.b100-security-scroll #security .b98-execution-readiness{
    overflow:visible!important;
  }

  main.b100-security-scroll #security .security-shell{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    align-items:start!important;
  }

  main.b100-security-scroll #security .security-main{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  main.b100-security-scroll #security .security-side{
    align-self:start!important;
    position:sticky!important;
    top:8px!important;
    max-height:calc(100vh - 82px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }

  body.b100-security-open{
    overflow:hidden!important;
  }
}

/* Chrome supports :has(); this is a CSS fallback if JS has not yet toggled the class. */
@media (min-width:1200px){
  main:has(#security:not(.hidden)){
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}

@media (max-width:1199px){
  body.b100-security-open{overflow:auto!important}
  main.b100-security-scroll{
    height:auto!important;
    overflow:visible!important;
  }
  #security.qlyra-security-view{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding-bottom:40px!important;
  }
  #security .security-shell{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  #security .security-main,
  #security .security-side{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    position:static!important;
  }
}

#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon{display:none!important}
#b100RuntimeRibbon{display:block!important}

/* ===== QLYRA B101 · MARKET INTELLIGENCE CORE ===== */
.b101-radar-grid{grid-template-columns:1.12fr .5fr .72fr .62fr .62fr .78fr .7fr .62fr 1.2fr .55fr!important}
.b101-smart-grid{grid-template-columns:1.08fr .8fr .62fr .8fr .62fr .7fr .62fr 1.25fr .55fr!important}
.b101-regime{font-size:8px;font-weight:900;letter-spacing:.06em}
.b101-regime.bull{color:#52e7b9}.b101-regime.bear{color:#ff7890}.b101-regime.range{color:#6ecfff}.b101-regime.transition{color:#e8c575}
.b101-top-card{
  min-width:150px;display:grid;grid-template-columns:1fr auto;gap:3px 8px;align-items:center;
  padding:9px 10px;border:1px solid rgba(58,137,171,.22);border-radius:10px;background:rgba(4,20,31,.64);color:#dff8ff;text-align:left
}
.b101-top-card span{font-size:9px;font-weight:900}.b101-top-card b{font-size:17px;color:#62e7ff}
.b101-top-card em{font-style:normal;font-size:8px;color:#75e7c9}.b101-top-card small{grid-column:1/3;color:#6f91a5;font-size:8px}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon{display:none!important}
#b101RuntimeRibbon{display:block!important}
@media(max-width:1200px){
  .b101-radar-grid,.b101-smart-grid{min-width:980px}
  .opportunity-table-wrap,.qlyra-live-table-wrap{overflow-x:auto!important}
}

/* ===== QLYRA B102 · GRID POLISH / LIVE CLARITY ===== */
.b102-grid-wrap{
  border:1px solid rgba(54,134,169,.30)!important;
  border-radius:10px!important;
  overflow:auto!important;
  background:rgba(3,15,24,.38)!important;
  scrollbar-gutter:stable;
}

.b102-grid-wrap .radar-table-head,
.b102-grid-wrap .smart-table-head{
  position:sticky!important;
  top:0!important;
  z-index:8!important;
  background:rgba(5,22,34,.98)!important;
  box-shadow:0 1px 0 rgba(73,177,218,.20),0 6px 14px rgba(0,0,0,.14)!important;
}

.b102-grid-wrap .radar-table-head>span,
.b102-grid-wrap .smart-table-head>span{
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  padding:0 9px!important;
  border-right:1px solid rgba(67,145,179,.22)!important;
  color:#7ea5b9!important;
  font-size:8px!important;
  letter-spacing:.07em!important;
  font-weight:800!important;
  text-transform:uppercase!important;
}

.b102-grid-wrap .radar-table-head>span:last-child,
.b102-grid-wrap .smart-table-head>span:last-child{
  border-right:0!important;
}

.b102-grid-row{
  position:relative;
  border-bottom:1px solid rgba(59,129,160,.18)!important;
  transition:background .13s ease, box-shadow .13s ease!important;
}

.b102-grid-row.b102-zebra{
  background:rgba(7,29,42,.32)!important;
}

.b102-grid-row:hover{
  background:rgba(43,164,211,.09)!important;
  box-shadow:inset 3px 0 0 rgba(59,211,255,.80)!important;
}

.b102-grid-row.selected{
  background:linear-gradient(90deg,rgba(41,187,229,.12),rgba(41,187,229,.03))!important;
  box-shadow:inset 3px 0 0 #50ddff, inset 0 0 0 1px rgba(80,221,255,.12)!important;
}

.b102-cell{
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  padding:6px 9px!important;
  border-right:1px solid rgba(62,137,170,.16)!important;
}

.b102-cell:last-child{
  border-right:0!important;
}

.b102-number-cell{
  font-variant-numeric:tabular-nums;
  justify-content:flex-start!important;
}

.b102-badge-cell{
  justify-content:flex-start!important;
}

.b102-pill,
.b102-flow-pill{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:3px 7px;
  border:1px solid rgba(86,196,231,.22);
  border-radius:999px;
  background:rgba(22,76,98,.22);
  font-size:7px;
  line-height:1;
  font-weight:900;
  letter-spacing:.05em;
  white-space:nowrap;
}

.b102-regime-pill{
  color:#88defb;
}

.b102-setup-cell{
  align-items:flex-start!important;
  justify-content:center!important;
  flex-direction:column!important;
  gap:3px!important;
}

.b102-bias-pill{
  display:inline-flex;
  max-width:100%;
  padding:3px 6px;
  border-radius:6px;
  background:rgba(32,189,218,.10);
  border:1px solid rgba(56,208,235,.18);
  color:#77ebff!important;
  font-size:7px!important;
  letter-spacing:.03em;
}

.b102-setup-note{
  display:block;
  max-width:100%;
  color:#7f9fb0!important;
  font-size:7px!important;
  line-height:1.25!important;
  white-space:normal!important;
}

.b102-flow-pill.positive{color:#66e9ba;border-color:rgba(71,222,173,.28);background:rgba(33,140,105,.12)}
.b102-flow-pill.negative{color:#ff8297;border-color:rgba(255,107,131,.28);background:rgba(142,49,65,.12)}
.b102-flow-pill.warning{color:#e8c575;border-color:rgba(232,197,117,.28);background:rgba(135,105,43,.12)}
.b102-flow-pill.relative{color:#7ecfff;border-color:rgba(100,198,255,.28);background:rgba(40,105,150,.12)}
.b102-flow-pill.neutral{color:#9fb7c5}

.b102-live-status{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:5px 7px!important;
  border:1px solid rgba(58,159,194,.18)!important;
  border-radius:9px!important;
  background:rgba(4,18,28,.48)!important;
}

.b102-live-status>div{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:92px;
}

.b102-live-status small{
  color:#66899d;
  font-size:6px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.b102-live-status b{
  color:#bfeeff;
  font-size:8px;
  font-variant-numeric:tabular-nums;
}

.opportunity-top-strip{
  gap:8px!important;
}
.b101-top-card{
  border-color:rgba(62,150,184,.28)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.01)!important;
}
.b101-top-card:hover{
  border-color:rgba(78,213,255,.52)!important;
  background:rgba(26,104,133,.16)!important;
}

#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon{
  display:none!important
}
#b102RuntimeRibbon{display:block!important}

@media(max-width:1200px){
  .b102-grid-wrap{
    overflow-x:auto!important;
  }
  .b101-radar-grid{min-width:1120px!important}
  .b101-smart-grid{min-width:1040px!important}
}

/* ===== QLYRA B103 · SMART MONEY ALIGNMENT + AI BACKEND ===== */

/* Same exact grid definition for Smart Money header and rows. */
.b101-smart-grid,
.smart-table-head.b101-smart-grid,
.smart-live-row.b101-smart-grid{
  display:grid!important;
  grid-template-columns:
    minmax(120px,1.08fr)
    minmax(86px,.80fr)
    minmax(72px,.62fr)
    minmax(90px,.80fr)
    minmax(72px,.62fr)
    minmax(78px,.70fr)
    minmax(72px,.62fr)
    minmax(190px,1.25fr)
    minmax(64px,.55fr)!important;
  column-gap:0!important;
  align-items:stretch!important;
  width:100%!important;
  box-sizing:border-box!important;
}

.smart-table-head.b101-smart-grid>span,
.smart-live-row.b101-smart-grid>.b102-cell{
  min-width:0!important;
  width:auto!important;
  box-sizing:border-box!important;
  margin:0!important;
}

.smart-table-head.b101-smart-grid>span:last-child,
.smart-live-row.b101-smart-grid>.b102-cell:last-child{
  justify-content:center!important;
}

.smart-live-row.b101-smart-grid .mini-action{
  margin:0 auto!important;
  white-space:nowrap!important;
}

.b102-grid-wrap{
  scrollbar-gutter:stable both-edges;
}

.b103-ai-readiness{
  margin:10px 0;
  padding:10px;
  border:1px solid rgba(62,153,188,.24);
  border-radius:10px;
  background:rgba(4,19,29,.58);
}
.b103-ai-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.b103-ai-head span{
  color:#64e6ff;
  font-size:8px;
  font-weight:900;
  letter-spacing:.11em;
}
.b103-ai-head b{
  color:#c8f4ff;
  font-size:8px;
}
.b103-ai-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-bottom:8px;
}
.b103-ai-grid p{
  margin:0;
  padding:7px 8px;
  border:1px solid rgba(56,127,157,.18);
  border-radius:7px;
  background:rgba(3,14,23,.45);
}
.b103-ai-grid span{
  display:block;
  color:#688da2;
  font-size:7px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.b103-ai-grid b{
  display:block;
  margin-top:3px;
  color:#dff8ff;
  font-size:9px;
}
#b103AiDiagnostic{
  width:100%;
}
#b103AiHelp{
  display:block;
  margin-top:7px;
  color:#7598aa;
  font-size:8px;
  line-height:1.4;
}

#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon{
  display:none!important
}
#b103RuntimeRibbon{display:block!important}

@media(max-width:1200px){
  .smart-table-head.b101-smart-grid,
  .smart-live-row.b101-smart-grid{
    min-width:1040px!important;
  }
}

/* ===== QLYRA B104 · OPPORTUNITY RESPONSIVE NAME + AI DEPLOY CHECKLIST ===== */
.b104-pair-cell{
  min-width:0!important;
  overflow:hidden!important;
  align-items:flex-start!important;
  justify-content:center!important;
  flex-direction:column!important;
  gap:2px!important;
}
.b104-pair-cell>b{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#e5f7ff!important;
  font-size:9px!important;
  line-height:1.1!important;
}
.b104-pair-cell>small{
  display:block!important;
  width:100%!important;
  color:#6f93a7!important;
  font-size:7px!important;
  white-space:nowrap!important;
}

.b104-top-pair{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:2px!important;
}
.b104-top-pair>b{
  display:block!important;
  width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#e8f9ff!important;
  font-size:9px!important;
}
.b104-top-pair>small{
  color:#6e91a5!important;
  font-size:7px!important;
}

.b104-ai-checklist{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-top:8px;
}
.b104-ai-checklist>div{
  padding:7px 8px;
  border:1px solid rgba(56,128,158,.18);
  border-radius:7px;
  background:rgba(3,14,23,.40);
}
.b104-ai-checklist span{
  display:block;
  color:#668ca1;
  font-size:7px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.b104-ai-checklist b{
  display:block;
  margin-top:3px;
  color:#dff8ff;
  font-size:8px;
}

#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon{
  display:none!important
}
#b104RuntimeRibbon{display:block!important}

@media(max-width:1200px){
  .b104-pair-cell>b{font-size:8px!important}
  .b104-pair-cell>small{font-size:6.5px!important}
}

/* ===== QLYRA B105 · PRIVATE CONNECTION STATE RESTORE ===== */
.b105-private-restore-state{
  display:inline-flex;
  align-items:center;
  margin-top:6px;
  padding:4px 7px;
  border:1px solid rgba(74,150,181,.18);
  border-radius:999px;
  background:rgba(4,18,28,.42);
  color:#7598aa;
  font-size:7px;
  font-weight:800;
  letter-spacing:.04em;
}
.b105-private-restore-state[data-state="live"]{
  color:#64e7c2;
  border-color:rgba(100,231,194,.28);
  background:rgba(35,128,102,.10);
}
.b105-private-restore-state[data-state="warn"]{
  color:#e8c575;
  border-color:rgba(232,197,117,.24);
  background:rgba(124,94,34,.10);
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon{display:none!important}
#b105RuntimeRibbon{display:block!important}

/* ===== QLYRA B106 · CANONICAL PRIVATE STATE ===== */
.account-checklist>div.b106-ready{
  border-color:rgba(79,225,181,.22)!important;
  background:rgba(30,126,96,.07)!important;
}
.account-checklist>div.b106-ready>span{
  border-color:rgba(75,224,180,.42)!important;
  color:#65e6bb!important;
}
.account-checklist>div.b106-ready small{
  color:#72dcb9!important;
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon{display:none!important}
#b106RuntimeRibbon{display:block!important}

/* ===== QLYRA B107 · ACCOUNT VERIFIED STATE ===== */
#accountPrivateState.positive,
#accountBackendState.positive,
#accountHealthBridge.positive{
  color:#63e7bd!important;
}
#accountHealthGate.warn{
  color:#f3c26b!important;
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon{display:none!important}
#b107RuntimeRibbon{display:block!important}

/* ===== QLYRA B108 · CANONICAL ACCOUNT LOCK ===== */
#accountPrivateState.positive,
#accountBackendState.positive,
#accountHealthBridge.positive{
  color:#63e7bd!important;
}
#accountModeBadge.live-ok{
  color:#63e7bd!important;
  border-color:rgba(99,231,189,.35)!important;
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon{display:none!important}
#b108RuntimeRibbon{display:block!important}

/* ===== QLYRA B109 · FREEZE FIX ===== */
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon{display:none!important}
#b109RuntimeRibbon{display:block!important}

/* ===== QLYRA B110 ===== */
.b110-ai-next{
  margin-top:8px;
  padding:8px 9px;
  border:1px solid rgba(76,169,203,.22);
  border-radius:8px;
  background:rgba(5,24,34,.52);
}
.b110-ai-next span{
  display:block;
  color:#61dff8;
  font-size:7px;
  font-weight:900;
  letter-spacing:.08em;
}
.b110-ai-next b{
  display:block;
  margin-top:3px;
  color:#e1f8ff;
  font-size:9px;
}
.b110-ai-next small{
  display:block;
  margin-top:4px;
  color:#7899aa;
  font-size:8px;
  line-height:1.4;
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon{display:none!important}
#b110RuntimeRibbon{display:block!important}

/* ===== QLYRA B111 · SMALL WINDOW / COMPACT DESKTOP MODE ===== */
@media (min-width:641px) and (max-width:1050px){
  body{
    overflow:hidden!important;
  }

  header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:5px!important;
    min-height:84px!important;
    padding:6px 8px!important;
    align-items:center!important;
  }

  .b80-header-left,
  .b80-header-right{
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    margin:0!important;
  }

  .b80-header-left .brand{
    flex:0 0 122px!important;
    min-width:122px!important;
  }

  .b80-header-left .brand .logo{
    font-size:28px!important;
  }

  .b80-header-left .brand b{
    font-size:11px!important;
    letter-spacing:2.6px!important;
  }

  .b80-header-left .brand small{
    display:none!important;
  }

  .b80-header-left .header-voice-btn{
    flex:0 0 42px!important;
    min-width:42px!important;
    width:42px!important;
    padding:0!important;
  }

  .header-voice-label{
    display:none!important;
  }

  .b81-search-wrap{
    flex:1 1 auto!important;
    min-width:0!important;
  }

  .b80-header-left #globalSearch,
  header #globalSearch,
  header .search{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    flex:1 1 auto!important;
    height:34px!important;
    padding:8px 10px!important;
    font-size:10px!important;
  }

  .b80-header-right{
    justify-content:flex-end!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    scrollbar-width:thin;
  }

  .b80-header-right .theme-switch button,
  .b80-header-right .lang-switch button,
  .b80-header-right #logoutBtn,
  .b80-header-right .role-pill{
    height:30px!important;
    min-height:30px!important;
    padding:4px 7px!important;
    font-size:9px!important;
  }

  #qlyraBuildBadge{
    padding:4px 6px!important;
    font-size:8px!important;
  }

  .layout{
    display:grid!important;
    grid-template-columns:124px minmax(0,1fr)!important;
    gap:4px!important;
    padding:4px!important;
    height:calc(100vh - 84px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .layout>aside{
    position:static!important;
    width:124px!important;
    min-width:124px!important;
    max-width:124px!important;
    height:100%!important;
    display:block!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:5px!important;
    border-radius:10px!important;
  }

  .layout>aside .nav{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    margin:3px 0!important;
    padding:0 7px 0 31px!important;
    font-size:9.5px!important;
    line-height:1.08!important;
    white-space:normal!important;
  }

  .layout>aside .nav::before{
    left:7px!important;
  }

  main{
    width:auto!important;
    min-width:0!important;
    height:100%!important;
    padding:4px!important;
    overflow:auto!important;
  }

  .qlyra-live-module-view,
  .qlyra-work-view{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .qlyra-module-shell{
    height:100%!important;
    grid-template-columns:minmax(0,1fr)!important;
  }

  .qlyra-module-side{
    display:none!important;
  }

  .qlyra-module-head{
    padding:8px 10px!important;
  }

  .qlyra-module-head h2{
    font-size:17px!important;
  }

  .qlyra-module-head p{
    font-size:8px!important;
  }

  .opportunity-top-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
    padding:6px!important;
  }

  .qlyra-module-controls{
    flex-wrap:wrap!important;
    align-items:flex-start!important;
    padding:6px!important;
  }

  .markets-filter-tabs{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:4px!important;
  }

  .markets-filter-tabs button{
    padding:5px 6px!important;
    font-size:8px!important;
  }

  .opportunity-control-right{
    width:100%!important;
    justify-content:space-between!important;
  }

  .markets-page-search{
    min-width:0!important;
    flex:1 1 auto!important;
  }

  .b102-grid-wrap{
    overflow:auto!important;
    min-width:0!important;
  }

  .b101-radar-grid{
    min-width:980px!important;
  }

  .b101-smart-grid{
    min-width:940px!important;
  }

  .qlyra-work-shell{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .qlyra-work-side,
  .voice-side-card{
    display:none!important;
  }

  .voice-stage-card{
    min-height:520px!important;
  }
}

@media (max-width:640px){
  header{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    padding:5px!important;
  }

  .b80-header-left,
  .b80-header-right{
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    gap:4px!important;
    overflow-x:auto!important;
  }

  .layout{
    display:grid!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:3px!important;
    padding:3px!important;
  }

  .layout>aside{
    position:static!important;
    width:92px!important;
    min-width:92px!important;
    max-width:92px!important;
    height:calc(100vh - 92px)!important;
    display:block!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:4px!important;
  }

  .layout>aside .nav{
    width:100%!important;
    min-width:0!important;
    height:34px!important;
    min-height:34px!important;
    padding:0 4px 0 26px!important;
    font-size:8px!important;
  }

  main{
    width:auto!important;
    min-width:0!important;
    padding:3px!important;
  }
}

/* Keep old mobile full-width nav rules from overriding B111 compact-desktop mode. */
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon{
  display:none!important
}
#b111RuntimeRibbon{display:block!important}

/* ===== QLYRA B112 · LIVE COSMIC WEBGL BRAIN ===== */
.b112-brain-stage{
  position:relative!important;
  overflow:hidden!important;
  min-height:520px!important;
  background:
    radial-gradient(circle at 50% 46%,rgba(43,67,189,.18),transparent 26%),
    radial-gradient(circle at 48% 48%,rgba(30,205,255,.10),transparent 42%),
    radial-gradient(circle at 62% 30%,rgba(211,61,255,.07),transparent 32%),
    linear-gradient(180deg,#020812,#02060d 64%,#01040a)!important;
  cursor:grab;
}
.b112-brain-stage:active{cursor:grabbing}
.b112-webgl-canvas{
  position:absolute;inset:0;width:100%;height:100%;z-index:4;
  filter:drop-shadow(0 0 12px rgba(54,190,255,.18));
}
.b112-brain-vortex{
  position:absolute;left:50%;top:50%;width:62%;aspect-ratio:1/0.36;
  transform:translate(-50%,-50%) rotate(-7deg);
  border-radius:50%;
  border:1px solid rgba(121,91,255,.12);
  box-shadow:
    0 0 50px rgba(72,129,255,.10),
    inset 0 0 55px rgba(225,75,255,.06);
  z-index:2;pointer-events:none;
}
.b112-brain-vortex::before,.b112-brain-vortex::after{
  content:"";position:absolute;inset:12%;border-radius:50%;
  border:1px solid rgba(54,220,255,.11);
  box-shadow:0 0 30px rgba(54,220,255,.08);
}
.b112-brain-vortex::after{
  inset:27%;border-color:rgba(255,94,218,.12);
}
.b112-coin-layer{position:absolute;inset:0;z-index:10;pointer-events:none}
.b112-coin-node{
  position:absolute;left:0;top:0;pointer-events:auto;
  width:58px;height:58px;padding:0;border-radius:50%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  border:1px solid rgba(82,222,255,.42)!important;
  background:
    radial-gradient(circle at 35% 30%,rgba(219,250,255,.24),rgba(23,70,125,.86) 36%,rgba(8,20,44,.96) 72%)!important;
  color:#dffbff!important;
  box-shadow:0 0 18px rgba(54,211,255,.18),inset 0 0 16px rgba(74,94,255,.15)!important;
  transition:border-color .16s ease,box-shadow .16s ease,filter .16s ease;
  will-change:transform;
}
.b112-coin-node span{font:900 10px/1 Inter,system-ui,sans-serif;letter-spacing:.05em}
.b112-coin-node small{margin-top:4px;font:800 8px/1 Inter,system-ui,sans-serif;color:#74eaff}
.b112-coin-node.hover,.b112-coin-node:hover{
  border-color:#95f5ff!important;filter:brightness(1.18);
  box-shadow:0 0 28px rgba(82,226,255,.34),0 0 52px rgba(121,75,255,.15)!important;
}
.b112-coin-node.selected{
  border-color:#ff8de7!important;
  box-shadow:0 0 22px rgba(255,84,218,.48),0 0 54px rgba(102,87,255,.30),inset 0 0 20px rgba(255,106,228,.18)!important;
}
.b112-brain-metrics{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:0!important;
}
.b112-brain-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 10px 12px}
.b112-brain-actions button{min-height:38px}
.brain-viewport-card{
  box-shadow:inset 0 0 80px rgba(37,109,210,.06),0 18px 50px rgba(0,0,0,.28)!important;
}
.brain-workspace-head{
  background:
    radial-gradient(circle at 82% 0,rgba(122,72,255,.12),transparent 28%),
    radial-gradient(circle at 12% 0,rgba(40,215,255,.08),transparent 30%),
    rgba(3,16,27,.92)!important;
}
.brain-hud{z-index:20!important}
.brain-fallback{z-index:30!important}
@media(max-width:1180px){
  .brain-workspace{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .brain-inspector{
    display:block!important;
  }
  .b112-brain-stage{min-height:460px!important}
}
@media(max-width:760px){
  .b112-brain-stage{min-height:400px!important}
  .b112-coin-node{width:46px;height:46px}
  .b112-coin-node span{font-size:8px}
  .b112-coin-node small{font-size:7px}
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon,#b111RuntimeRibbon{display:none!important}
#b112RuntimeRibbon{display:block!important}

/* ===== QLYRA B113 · REFERENCE COSMIC BRAIN ===== */
.b112-brain-stage{
  min-height:560px!important;
  background:
    radial-gradient(circle at 50% 48%,rgba(76,36,175,.20),transparent 20%),
    radial-gradient(circle at 50% 50%,rgba(22,146,255,.14),transparent 34%),
    radial-gradient(circle at 28% 30%,rgba(55,55,255,.08),transparent 28%),
    radial-gradient(circle at 72% 28%,rgba(255,67,182,.08),transparent 30%),
    #01030a!important;
}
.b113-webgl-canvas{
  position:absolute;inset:0;width:100%;height:100%;z-index:7;
  filter:
    drop-shadow(0 0 7px rgba(85,210,255,.35))
    drop-shadow(0 0 22px rgba(150,65,255,.18));
}
.b113-accretion{
  position:absolute;left:50%;top:50%;pointer-events:none;z-index:2;
  width:83%;height:29%;border-radius:50%;
  transform:translate(-50%,-50%) rotate(-8deg);
  opacity:.80;
}
.b113-accretion-a{
  background:
    conic-gradient(from 15deg,
      rgba(12,27,67,0) 0 7%,
      rgba(56,102,255,.25) 11%,
      rgba(144,52,255,.60) 22%,
      rgba(255,75,190,.90) 34%,
      rgba(255,190,225,.86) 40%,
      rgba(255,91,197,.67) 47%,
      rgba(84,99,255,.34) 62%,
      rgba(24,188,255,.18) 72%,
      rgba(9,23,60,0) 86% 100%);
  filter:blur(5px) drop-shadow(0 0 24px rgba(255,75,188,.34));
  animation:b113spin 24s linear infinite;
}
.b113-accretion-b{
  width:72%;height:22%;transform:translate(-50%,-50%) rotate(13deg);
  background:
    conic-gradient(from 155deg,
      transparent 0 10%,
      rgba(45,188,255,.18) 18%,
      rgba(117,77,255,.52) 33%,
      rgba(255,76,185,.72) 49%,
      rgba(255,214,236,.48) 57%,
      rgba(118,69,255,.31) 73%,
      transparent 88%);
  filter:blur(8px);
  animation:b113spin2 31s linear infinite;
}
.b113-core-flare{
  position:absolute;left:50%;top:48%;width:17%;aspect-ratio:1;border-radius:50%;
  transform:translate(-50%,-50%);z-index:5;pointer-events:none;
  background:radial-gradient(circle,
    rgba(255,255,255,.90) 0,
    rgba(255,209,249,.68) 6%,
    rgba(255,94,207,.30) 20%,
    rgba(88,118,255,.12) 44%,
    transparent 70%);
  filter:blur(2px);
  animation:b113flare 2.8s ease-in-out infinite alternate;
}
.b112-brain-vortex{
  width:66%!important;height:66%!important;aspect-ratio:1!important;
  top:48%!important;opacity:.38!important;border:none!important;
  background:radial-gradient(circle,transparent 0 36%,rgba(255,84,205,.08) 46%,transparent 62%)!important;
  box-shadow:none!important;
}
.b113-coin-node{
  position:absolute;left:0;top:0;pointer-events:auto;
  width:48px;height:48px;padding:0;border-radius:50%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  color:#e6fbff!important;
  border:1px solid rgba(145,230,255,.30)!important;
  background:
    radial-gradient(circle at 33% 28%,rgba(255,255,255,.34),rgba(98,89,255,.36) 26%,rgba(19,31,81,.88) 66%,rgba(7,10,30,.96))!important;
  box-shadow:0 0 14px rgba(86,197,255,.20),inset 0 0 12px rgba(255,86,214,.09)!important;
  transition:.16s ease;will-change:transform;
}
.b113-coin-node span{font:900 9px/1 Inter,system-ui,sans-serif;letter-spacing:.04em}
.b113-coin-node small{font:800 7px/1 Inter,system-ui,sans-serif;margin-top:3px;color:#8aeaff}
.b113-coin-node:hover{
  border-color:rgba(194,248,255,.75)!important;
  box-shadow:0 0 21px rgba(67,213,255,.34),0 0 36px rgba(135,73,255,.18)!important;
}
.b113-coin-node.selected{
  border-color:#ff9be8!important;
  background:
    radial-gradient(circle at 33% 28%,rgba(255,255,255,.44),rgba(255,92,211,.38) 28%,rgba(65,35,137,.88) 65%,rgba(15,7,42,.96))!important;
  box-shadow:0 0 18px rgba(255,99,213,.55),0 0 40px rgba(118,76,255,.30)!important;
}
@keyframes b113spin{to{transform:translate(-50%,-50%) rotate(352deg)}}
@keyframes b113spin2{to{transform:translate(-50%,-50%) rotate(-347deg)}}
@keyframes b113flare{
  from{transform:translate(-50%,-50%) scale(.92);opacity:.63}
  to{transform:translate(-50%,-50%) scale(1.08);opacity:1}
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon,#b111RuntimeRibbon,#b112RuntimeRibbon{display:none!important}
#b113RuntimeRibbon{display:block!important}

/* ===== QLYRA B114 · TRANSLUCENT THOUGHT BRAIN ===== */
.b112-brain-stage{
  background:
    radial-gradient(circle at 50% 48%,rgba(43,54,150,.16),transparent 26%),
    radial-gradient(circle at 50% 52%,rgba(35,178,255,.08),transparent 46%),
    radial-gradient(circle at 67% 34%,rgba(255,61,191,.045),transparent 28%),
    #01040b!important;
}
.b113-accretion{
  opacity:.22!important;
  filter:blur(11px)!important;
}
.b113-accretion-a{animation-duration:44s!important}
.b113-accretion-b{opacity:.13!important;animation-duration:58s!important}
.b113-core-flare{
  width:11%!important;opacity:.38!important;filter:blur(7px)!important;
}
.b114-webgl-canvas{
  position:absolute;inset:0;width:100%;height:100%;z-index:8;
  filter:
    drop-shadow(0 0 8px rgba(69,214,255,.24))
    drop-shadow(0 0 28px rgba(146,64,255,.18));
}
.b114-thought-status{
  position:absolute;left:50%;top:18px;transform:translateX(-50%);
  z-index:30;padding:6px 10px;border-radius:999px;
  border:1px solid rgba(83,214,255,.22);
  background:rgba(4,16,30,.62);backdrop-filter:blur(10px);
  color:#72dff5;font:800 8px/1 Inter,system-ui,sans-serif;letter-spacing:.12em;
  opacity:.62;transition:.2s ease;pointer-events:none
}
.b114-thought-status.active{
  color:#ffd8f5;border-color:rgba(255,96,213,.46);
  box-shadow:0 0 20px rgba(255,84,211,.20),inset 0 0 14px rgba(98,95,255,.12);
  opacity:1
}
.b114-coin-node{
  position:absolute;left:0;top:0;pointer-events:auto;
  width:44px;height:44px;padding:0;border-radius:50%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  color:#e6fbff!important;
  border:1px solid rgba(137,229,255,.35)!important;
  background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.28),rgba(48,103,178,.48) 30%,rgba(11,24,61,.86) 72%)!important;
  box-shadow:0 0 13px rgba(57,206,255,.17),inset 0 0 12px rgba(118,85,255,.10)!important;
  transition:.15s ease;will-change:transform
}
.b114-coin-node span{font:900 8px/1 Inter,system-ui,sans-serif;letter-spacing:.04em}
.b114-coin-node small{font:800 7px/1 Inter,system-ui,sans-serif;margin-top:3px;color:#7ce7ff}
.b114-coin-node.selected{
  border-color:#ff95e7!important;
  background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.36),rgba(255,87,206,.34) 32%,rgba(55,31,125,.88) 72%)!important;
  box-shadow:0 0 18px rgba(255,91,213,.46),0 0 36px rgba(103,83,255,.24)!important
}
.b112-coin-layer{z-index:12!important}
@media(max-width:760px){
  .b114-coin-node{width:38px;height:38px}
  .b114-thought-status{top:10px}
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon,#b111RuntimeRibbon,#b112RuntimeRibbon,#b113RuntimeRibbon{display:none!important}
#b114RuntimeRibbon{display:block!important}

/* ===== QLYRA B115 · VISIBILITY + DATA ===== */
.b112-brain-stage{
  background:
    radial-gradient(circle at 50% 47%,rgba(35,128,255,.14),transparent 31%),
    radial-gradient(circle at 50% 52%,rgba(130,55,255,.10),transparent 43%),
    radial-gradient(circle at 68% 38%,rgba(255,65,190,.035),transparent 28%),
    #01040a!important;
}
.b113-accretion{opacity:.08!important;filter:blur(20px)!important}
.b113-core-flare{opacity:.16!important;width:8%!important}
.b115-webgl-canvas{
  position:absolute;inset:0;width:100%;height:100%;z-index:9;
  filter:drop-shadow(0 0 8px rgba(59,211,255,.28)) drop-shadow(0 0 24px rgba(135,68,255,.18))
}
.b115-coin-node{
  position:absolute;left:0;top:0;pointer-events:auto;width:42px;height:42px;padding:0;border-radius:50%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;color:#eafcff!important;
  border:1px solid rgba(134,231,255,.40)!important;
  background:radial-gradient(circle at 34% 29%,rgba(255,255,255,.30),rgba(44,104,183,.54) 31%,rgba(10,22,57,.92) 72%)!important;
  box-shadow:0 0 14px rgba(63,211,255,.20),inset 0 0 13px rgba(120,84,255,.12)!important
}
.b115-coin-node span{font:900 8px/1 Inter,system-ui,sans-serif}.b115-coin-node small{font:800 7px/1 Inter,system-ui,sans-serif;margin-top:3px;color:#82e9ff}
.b115-coin-node.selected{border-color:#ff9fe9!important;box-shadow:0 0 20px rgba(255,91,216,.54),0 0 38px rgba(112,86,255,.28)!important;background:radial-gradient(circle at 34% 29%,rgba(255,255,255,.38),rgba(255,89,207,.40) 31%,rgba(56,29,126,.94) 72%)!important}
#b115BrainFeed.live-ok{color:#55f3cb!important;border-color:#1eb98e!important}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon,#b111RuntimeRibbon,#b112RuntimeRibbon,#b113RuntimeRibbon,#b114RuntimeRibbon{display:none!important}
#b115RuntimeRibbon{display:block!important}
/* ===== QLYRA B116 · TRANSLUCENT NEURAL ORBIT BRAIN ===== */
.b112-brain-stage{background:radial-gradient(circle at 50% 46%,rgba(33,118,255,.13),transparent 34%),radial-gradient(circle at 50% 50%,rgba(137,66,255,.08),transparent 48%),#01040a!important}
.b113-accretion,.b113-core-flare,.b112-brain-vortex{opacity:.03!important}.b116-neural-scene{position:absolute;inset:1.5% 5% 3%;z-index:8;transform-origin:50% 50%;transition:transform .08s linear;pointer-events:none}.b116-brain-svg{width:100%;height:100%;overflow:visible}.b116-hemi{stroke-width:2.2;filter:url(#b116Glow)}.b116-hemi-left{fill:url(#b116LeftGlass);stroke:rgba(84,229,255,.80)}.b116-hemi-right{fill:url(#b116RightGlass);stroke:rgba(214,96,255,.72)}.b116-midline,.b116-cerebellum,.b116-brainstem{fill:rgba(82,207,255,.06);stroke:rgba(155,226,255,.50);stroke-width:1.6}.b116-sulci path{fill:none;stroke:rgba(164,236,255,.31);stroke-width:3.2;stroke-linecap:round;filter:url(#b116Glow)}.b116-inner-neural path{fill:none;stroke:#7edfff;stroke-width:2;opacity:.66;stroke-dasharray:7 10;animation:b116flow 4.8s linear infinite;filter:url(#b116Glow)}.b116-inner-neural circle{fill:#d8fbff;opacity:.70;filter:url(#b116Glow)}.b116-core-point{fill:#fff;filter:url(#b116SoftGlow)}.b116-core-aura{opacity:.74}.b116-link{fill:none;stroke:var(--link-color);stroke-width:1.55;opacity:.48;stroke-linecap:round;filter:url(#b116Glow);stroke-dasharray:4 7;animation:b116flow 4s linear infinite}.b116-link.selected{stroke-width:2.7;opacity:.96;stroke-dasharray:7 5}.b116-link-pulse{fill:var(--link-color);opacity:.42;filter:url(#b116Glow)}.b116-link-pulse.selected{opacity:1}.b116-thought-wave{fill:none;stroke:#ff98e4;stroke-width:3;opacity:0;filter:url(#b116Glow);animation:b116thought 2s ease-out forwards}.b116-brain-svg.thinking .b116-core-aura{animation:b116corePulse 1.3s ease-in-out 2}.b116-coin-node{position:absolute;left:0;top:0;pointer-events:auto;width:58px;height:58px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;color:#f5fdff!important;background:rgba(var(--node-rgb),.045)!important;border:1.6px solid var(--node-color)!important;box-shadow:0 0 15px rgba(var(--node-rgb),.18),inset 0 0 14px rgba(var(--node-rgb),.06)!important;backdrop-filter:blur(3px);transition:box-shadow .18s ease,border-color .18s ease,background .18s ease}.b116-coin-node .b116-ticker{font:900 12px/1 Inter,system-ui,sans-serif;letter-spacing:.06em;text-shadow:0 0 8px rgba(var(--node-rgb),.65)}.b116-coin-node small{margin-top:5px;font:800 8px/1 Inter,system-ui,sans-serif;color:rgba(230,250,255,.76)}.b116-coin-node:hover{background:rgba(var(--node-rgb),.075)!important;box-shadow:0 0 22px rgba(var(--node-rgb),.30),inset 0 0 16px rgba(var(--node-rgb),.08)!important}.b116-coin-node.selected{background:rgba(var(--node-rgb),.10)!important;border-color:#fff!important;box-shadow:0 0 18px rgba(var(--node-rgb),.58),0 0 42px rgba(var(--node-rgb),.24),inset 0 0 18px rgba(var(--node-rgb),.11)!important}.b112-coin-layer{z-index:13!important}@keyframes b116flow{to{stroke-dashoffset:-44}}@keyframes b116thought{0%{opacity:.78;transform-origin:500px 302px;transform:scale(.68)}100%{opacity:0;transform-origin:500px 302px;transform:scale(1.55)}}@keyframes b116corePulse{0%,100%{opacity:.58}50%{opacity:1}}@media(max-width:900px){.b116-neural-scene{inset:3% 2% 4%}.b116-coin-node{width:48px;height:48px}.b116-coin-node .b116-ticker{font-size:10px}.b116-coin-node small{font-size:7px}}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon,#b111RuntimeRibbon,#b112RuntimeRibbon,#b113RuntimeRibbon,#b114RuntimeRibbon,#b115RuntimeRibbon{display:none!important}#b116RuntimeRibbon{display:block!important}


/* ===== QLYRA B117 · VOLUMETRIC COSMIC BRAIN ===== */
#b116NeuralScene{display:none!important}
#b117BrainCanvas{
  position:absolute;inset:0;width:100%;height:100%;z-index:9;
  cursor:grab;
  filter:
    drop-shadow(0 0 8px rgba(67,213,255,.25))
    drop-shadow(0 0 18px rgba(147,70,255,.14));
}
#b117BrainCanvas:active{cursor:grabbing}
.b112-brain-stage{
  background:
    radial-gradient(circle at 50% 46%,rgba(36,114,255,.105),transparent 35%),
    radial-gradient(circle at 50% 53%,rgba(134,55,255,.065),transparent 48%),
    linear-gradient(180deg,#01040a,#02060c 68%,#010309)!important;
}
.b113-accretion,.b113-core-flare,.b112-brain-vortex{display:none!important}
.b117-coin-node{
  position:absolute;left:0;top:0;pointer-events:auto;
  width:54px;height:54px;border-radius:50%;padding:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  color:#f8feff!important;
  background:rgba(4,12,24,.16)!important;
  border:1.35px solid color-mix(in srgb,var(--node-color) 78%,white 22%)!important;
  box-shadow:0 0 12px color-mix(in srgb,var(--node-color) 24%,transparent)!important;
  backdrop-filter:blur(4px);
  transition:box-shadow .16s ease,border-color .16s ease,background .16s ease;
}
.b117-coin-node::before{
  content:"";position:absolute;inset:4px;border-radius:50%;
  border:1px solid color-mix(in srgb,var(--node-color) 30%,transparent);
  opacity:.55;
}
.b117-coin-node span{
  position:relative;z-index:1;
  font:900 11px/1 Inter,system-ui,sans-serif;
  letter-spacing:.08em;text-shadow:0 0 8px var(--node-color)
}
.b117-coin-node small{
  position:relative;z-index:1;margin-top:5px;
  font:800 7px/1 Inter,system-ui,sans-serif;color:#d8f5ff;opacity:.76
}
.b117-coin-node:hover{
  background:rgba(10,22,42,.26)!important;
  box-shadow:0 0 20px color-mix(in srgb,var(--node-color) 36%,transparent)!important
}
.b117-coin-node.selected{
  border-color:#fff!important;
  background:rgba(14,28,54,.28)!important;
  box-shadow:
    0 0 18px var(--node-color),
    0 0 36px color-mix(in srgb,var(--node-color) 28%,transparent)!important
}
.b112-coin-layer{z-index:13!important}
@media(max-width:900px){
  .b117-coin-node{width:46px;height:46px}
  .b117-coin-node span{font-size:9px}
  .b117-coin-node small{font-size:6px}
}
#b88RuntimeRibbon,#b89RuntimeRibbon,#b90RuntimeRibbon,#b91RuntimeRibbon,#b92RuntimeRibbon,#b93RuntimeRibbon,#b94RuntimeRibbon,#b95RuntimeRibbon,#b96RuntimeRibbon,#b97RuntimeRibbon,#b98RuntimeRibbon,#b99RuntimeRibbon,#b100RuntimeRibbon,#b101RuntimeRibbon,#b102RuntimeRibbon,#b103RuntimeRibbon,#b104RuntimeRibbon,#b105RuntimeRibbon,#b106RuntimeRibbon,#b107RuntimeRibbon,#b108RuntimeRibbon,#b109RuntimeRibbon,#b110RuntimeRibbon,#b111RuntimeRibbon,#b112RuntimeRibbon,#b113RuntimeRibbon,#b114RuntimeRibbon,#b115RuntimeRibbon,#b116RuntimeRibbon{display:none!important}
#b117RuntimeRibbon{display:block!important}


/* B118: one 3D scene, crisp labels, no cosmetic backdrop layers. */
#brain3d.b112-brain-stage{background:#07111e!important;isolation:isolate;overflow:hidden;min-height:510px}
#brain3d::before,#brain3d::after{display:none!important}
#b118BrainCanvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;cursor:grab;touch-action:none;outline:none}
#b118BrainCanvas:active{cursor:grabbing}
#b118BrainCanvas:focus-visible{outline:1px solid #64b8ce;outline-offset:-4px}
#b118NodeLayer{position:absolute;inset:0;z-index:2;pointer-events:none}
#b118NodeLayer .b118-node{position:absolute;left:0;top:0;width:32px;height:32px;padding:0;border:0!important;background:transparent!important;box-shadow:none!important;pointer-events:auto;color:#e6edf3!important;border-radius:50%;overflow:visible;opacity:var(--depth,1)}
#b118NodeLayer .b118-node[hidden]{display:none!important}
.b118-node-ring{position:absolute;inset:6px;border:1px solid var(--node-color);border-radius:50%;background:transparent;box-shadow:0 0 8px color-mix(in srgb,var(--node-color) 16%,transparent)}
.b118-node-ring:after{content:"";position:absolute;inset:5px;border-radius:50%;background:var(--node-color);box-shadow:0 0 6px color-mix(in srgb,var(--node-color) 40%,transparent)}
.b118-node.selected .b118-node-ring{inset:3px;outline:1px solid color-mix(in srgb,var(--node-color) 25%,transparent);outline-offset:4px}
.b118-node.selected .b118-node-ring:after{inset:8px}
.b118-node:hover,.b118-node:focus-visible{opacity:1!important;outline:1px solid #e9f7ff!important;outline-offset:4px}
.b118-node-label{position:absolute;left:50%;top:50%;width:86px;text-align:center;pointer-events:none;white-space:nowrap;line-height:1.4;text-shadow:0 1px 3px #07111e,0 0 6px #07111e}
.b118-node-label b{display:block;font:650 12px/1.4 ui-sans-serif,system-ui,sans-serif;letter-spacing:.03em}
.b118-node-label small{display:block;font:10px/1.4 ui-monospace,monospace;color:#93a7bc;margin-top:2px}
.b118-node.selected .b118-node-label b{color:var(--node-color)}
.b118-scene-caption{position:absolute;left:22px;top:21px;z-index:3;display:flex;align-items:center;gap:9px;pointer-events:none;font:10px/1.4 ui-monospace,monospace;color:#6f849a;letter-spacing:.045em}
.b118-scene-caption b{color:#bbccd9;font-weight:500;letter-spacing:.16em}
.b118-status-dot{width:5px;height:5px;border-radius:50%;background:#6ba9bd}
#b118FeedStatus{padding-left:11px;border-left:1px solid #223447}
#b118Activity{position:absolute;bottom:43px;left:22px;z-index:3;font:11px/1.5 system-ui;color:#b5c5d3;pointer-events:none}
.b118-scene-help{position:absolute;bottom:20px;left:22px;z-index:3;font:10px/1.4 system-ui;color:#637d94;pointer-events:none}
#brainFallback{z-index:10;background:#07111ef0}
#b118Retry{margin-top:16px;pointer-events:auto}
#b118RuntimeRibbon{display:none!important}
@media(max-width:900px){#brain3d.b112-brain-stage{min-height:450px}.b118-scene-caption{left:15px;top:16px;gap:6px;font-size:9px}.b118-node-label b{font-size:11px}.b118-node-label small{font-size:9px}#b118Activity,.b118-scene-help{left:15px}#b118FeedStatus{padding-left:6px}}
.brain-viewport-card{background:#07111e!important;box-shadow:none!important}
.brain-viewport-card::before,.brain-viewport-card::after{display:none!important}
#brain3d.b112-brain-stage{height:100%!important;min-height:0!important;position:absolute!important;inset:0!important}
#b118BrainCanvas{filter:none!important}
#b118Activity{bottom:69px}.b118-scene-help{bottom:47px}
.b118-node-label b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){.b118-scene-caption{flex-wrap:wrap;max-width:calc(100% - 30px)}#b118FeedStatus{flex-basis:100%;padding-left:14px;border:0}.b118-scene-help{right:12px;bottom:50px}#b118Activity{bottom:87px;right:12px;font-size:10px}.brain-hud{gap:4px;flex-wrap:wrap}.brain-hud span{font-size:7px;padding:4px}}

/* ===== QLYRA B119 · COSMIC NEURAL FUSION ===== */
#brain3d.b112-brain-stage{
  background:
    radial-gradient(circle at 48% 47%,rgba(74,38,175,.18),transparent 0 24%),
    radial-gradient(circle at 24% 25%,rgba(24,94,210,.14),transparent 0 32%),
    radial-gradient(circle at 78% 36%,rgba(193,48,175,.12),transparent 0 30%),
    radial-gradient(circle at 55% 82%,rgba(255,81,138,.055),transparent 0 34%),
    linear-gradient(180deg,#01030a 0%,#020611 58%,#01030a 100%)!important;
  box-shadow:inset 0 0 90px rgba(0,0,0,.55);
}
#brain3d.b112-brain-stage::before{
  content:"";display:block!important;position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(circle at 18% 22%,rgba(86,108,255,.09),transparent 0 21%),
    radial-gradient(circle at 76% 28%,rgba(245,77,206,.08),transparent 0 20%),
    radial-gradient(circle at 52% 62%,rgba(40,219,255,.045),transparent 0 25%);
  filter:blur(18px);opacity:.9;
}
#brain3d.b112-brain-stage::after{
  content:"";display:block!important;position:absolute;inset:0;z-index:0;pointer-events:none;
  background-image:
    radial-gradient(circle at 10% 20%,rgba(255,255,255,.65) 0 1px,transparent 1.5px),
    radial-gradient(circle at 35% 12%,rgba(120,202,255,.55) 0 1px,transparent 1.5px),
    radial-gradient(circle at 62% 24%,rgba(255,122,224,.48) 0 1px,transparent 1.5px),
    radial-gradient(circle at 82% 64%,rgba(125,143,255,.55) 0 1px,transparent 1.5px),
    radial-gradient(circle at 28% 76%,rgba(255,255,255,.45) 0 1px,transparent 1.5px);
  background-size:145px 120px,190px 160px,170px 140px,220px 180px,200px 165px;
  opacity:.30;
}
#b118BrainCanvas{
  z-index:1!important;
  filter:saturate(1.32) contrast(1.10) drop-shadow(0 0 8px rgba(83,172,255,.10))!important;
}
#b118NodeLayer{z-index:4!important}
.b119-node{
  width:44px!important;height:44px!important;opacity:var(--depth,1);
}
.b119-node .b119-node-ring{
  inset:3px!important;
  border:1.35px solid var(--node-color)!important;
  background:rgba(4,10,24,.18)!important;
  box-shadow:
    0 0 15px color-mix(in srgb,var(--node-color) 36%,transparent),
    inset 0 0 12px color-mix(in srgb,var(--node-color) 11%,transparent)!important;
  backdrop-filter:blur(4px);
}
.b119-node .b119-node-ring:after{
  inset:13px!important;
  background:var(--node-color)!important;
  opacity:.72;
  box-shadow:0 0 11px var(--node-color)!important;
}
.b119-node.selected .b119-node-ring{
  inset:0!important;border-color:#fff!important;
  box-shadow:
    0 0 20px var(--node-color),
    0 0 40px color-mix(in srgb,var(--node-color) 28%,transparent)!important;
}
.b119-node .b118-node-label{
  width:94px!important;
  text-shadow:0 2px 5px #01040a,0 0 10px #01040a!important;
}
.b119-node .b118-node-label b{
  font-size:12px!important;font-weight:800!important;letter-spacing:.055em!important;color:#f1fbff;
}
.b119-node .b118-node-label small{
  font-size:9px!important;color:#a9bdd0!important;
}
.b119-node.selected .b118-node-label b{color:var(--node-color)!important}
.b118-scene-caption{z-index:5!important}
#b118Activity,.b118-scene-help{z-index:5!important}
.brain-fallback{z-index:9!important}
@media(max-width:900px){
  .b119-node{width:39px!important;height:39px!important}
  .b119-node .b118-node-label{width:84px!important}
}


/* ===== QLYRA B120 · RESPONSIVE TRADER / SMALL DESKTOP FIX =====
   Goal: when Chrome is reduced on Mac, keep the chart as the primary viewport
   instead of stacking Markets above it and squeezing the graph.
*/
@media (max-width: 1100px){
  html,body{overflow:auto!important}
  .app{min-width:0!important;width:100%!important}
  header{
    min-height:54px!important;
    padding:6px 8px!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
  }
  .b80-header-left{min-width:0!important;gap:5px!important}
  .b80-header-left .brand{
    min-width:118px!important;flex:0 0 118px!important;
  }
  .b80-header-left .brand .logo{font-size:28px!important}
  .b80-header-left .brand b{font-size:11px!important;letter-spacing:2.6px!important}
  .b80-header-left .brand small{display:none!important}
  .b80-header-left .header-voice-btn{
    width:42px!important;min-width:42px!important;padding:0!important;
    overflow:hidden!important;color:transparent!important;
  }
  .b80-header-left .header-voice-btn::before{
    content:'🎙';color:#9cecff;font-size:15px;
    position:absolute;inset:0;display:grid;place-items:center;
  }
  .b80-header-left #globalSearch{
    flex:1 1 auto!important;width:auto!important;min-width:120px!important;max-width:none!important;
    height:34px!important;font-size:10px!important;
  }
  .b80-header-right{gap:4px!important}
  .b80-header-right .theme-switch button,
  .b80-header-right .role-pill,
  .b80-header-right #logoutBtn,
  #qlyraBuildBadge{
    padding:6px 7px!important;font-size:9px!important;
  }

  /* Keep the application navigation vertical on a reduced desktop window. */
  .layout{
    display:grid!important;
    grid-template-columns:116px minmax(0,1fr)!important;
    gap:5px!important;
    padding:5px!important;
    height:calc(100vh - 54px)!important;
    min-height:620px!important;
  }
  .layout>aside{
    position:static!important;
    width:116px!important;min-width:116px!important;max-width:116px!important;
    height:100%!important;
    display:flex!important;flex-direction:column!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    padding:6px!important;gap:4px!important;border-radius:12px!important;
  }
  .layout>aside .nav{
    width:100%!important;min-width:0!important;flex:0 0 38px!important;
    height:38px!important;min-height:38px!important;
    padding:0 5px 0 31px!important;font-size:10px!important;
  }
  .layout>aside .nav::before{left:6px!important;width:18px!important;height:18px!important}
  main{
    width:100%!important;min-width:0!important;height:100%!important;
    overflow-y:auto!important;overflow-x:hidden!important;padding:0!important;
  }
  .view#dashboard{
    height:auto!important;min-height:100%!important;overflow:visible!important;
  }

  /* Trader is chart-first on small desktop. */
  .terminal-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    grid-template-areas:
      "chart"
      "positions"
      "book"
      "trade"!important;
    height:auto!important;min-height:0!important;
    gap:7px!important;margin:0!important;
  }

  /* Markets no longer pushes the chart down. Market selection stays available
     through the Mercados module / market submenu already implemented. */
  .terminal-grid>.market-dock{
    display:none!important;
  }

  .terminal-grid>.chart-terminal{
    grid-area:chart!important;
    min-width:0!important;
    width:100%!important;
    height:clamp(500px,72vh,690px)!important;
    min-height:500px!important;
    overflow:hidden!important;
  }
  .terminal-grid>.positions-terminal{
    grid-area:positions!important;
    min-width:0!important;
    width:100%!important;
    min-height:145px!important;
    max-height:220px!important;
    overflow:auto!important;
  }
  .terminal-grid>.orderbook-panel{
    grid-area:book!important;
    min-width:0!important;
    width:100%!important;
    min-height:330px!important;
    max-height:430px!important;
  }
  .terminal-grid>.trade-panel{
    grid-area:trade!important;
    min-width:0!important;
    width:100%!important;
    min-height:auto!important;
  }

  /* Prevent pair metrics / toolbars from forcing horizontal overflow. */
  .pair-strip{
    display:grid!important;
    grid-template-columns:minmax(132px,auto) minmax(0,1fr) auto!important;
    gap:6px!important;padding:5px 7px!important;
  }
  .pair-identity{min-width:126px!important;max-width:150px!important}
  .pair-metrics{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(66px,1fr))!important;
    gap:4px!important;min-width:0!important;overflow:hidden!important;
  }
  .pair-stat{min-width:0!important;padding:0 4px!important}
  .pair-stat small{font-size:7px!important}
  .pair-stat b{font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .brain-launch{min-width:70px!important;padding:6px 7px!important;font-size:8px!important}

  .chart-tabs-row{
    display:flex!important;align-items:center!important;gap:5px!important;
    overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;
    padding:4px 6px!important;
  }
  .chart-tabs,.timeframe-toolbar{flex:0 0 auto!important;flex-wrap:nowrap!important}
  .chart-tabs button,.timeframe-toolbar button{
    padding:4px 6px!important;font-size:8px!important;min-width:0!important;
  }
  .chart-legend{
    min-height:21px!important;padding:3px 7px!important;font-size:7.5px!important;
    overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;
  }
  .price-chart,.tv-chart-shell,.qlyra-tv-widget,
  .qlyra-tv-widget>.tradingview-widget-container__widget,
  .qlyra-tv-widget iframe{
    width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;
  }
  .price-chart{flex:1 1 auto!important;min-height:0!important}
}

@media (max-width: 720px){
  .layout{
    grid-template-columns:88px minmax(0,1fr)!important;
  }
  .layout>aside{
    width:88px!important;min-width:88px!important;max-width:88px!important;
  }
  .layout>aside .nav{
    padding-left:27px!important;font-size:8.8px!important;
  }
  .layout>aside .nav::before{left:5px!important;width:16px!important;height:16px!important}
  .terminal-grid>.chart-terminal{
    height:520px!important;min-height:520px!important;
  }
  .pair-strip{
    grid-template-columns:1fr auto!important;
  }
  .pair-metrics{
    grid-column:1 / -1!important;
    grid-row:2!important;
    grid-template-columns:repeat(4,minmax(58px,1fr))!important;
  }
  .brain-launch{grid-column:2!important;grid-row:1!important}
}

/* B120 build marker */
#b119RuntimeRibbon{display:none!important}
#b120RuntimeRibbon{display:block!important}



/* ===== QLYRA B121 · SAME BRAIN IN TRADER ===== */
.b121-trader-brain{
  min-height:154px!important;
  background:
    radial-gradient(circle at 50% 46%,rgba(91,50,205,.18),transparent 0 32%),
    radial-gradient(circle at 28% 32%,rgba(26,107,225,.11),transparent 0 36%),
    radial-gradient(circle at 72% 60%,rgba(211,55,178,.09),transparent 0 34%),
    linear-gradient(180deg,#01040b,#020711)!important;
  border-color:rgba(88,205,255,.28)!important;
  box-shadow:
    inset 0 0 38px rgba(53,92,255,.05),
    0 0 16px rgba(0,0,0,.18)!important;
}
.b121-mini-brain-stage{
  height:103px!important;
  position:relative!important;
  overflow:hidden!important;
  isolation:isolate;
}
.b121-mini-brain-stage::before{
  content:"";
  position:absolute;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(circle at 19% 25%,rgba(101,107,255,.08),transparent 0 21%),
    radial-gradient(circle at 78% 28%,rgba(235,72,202,.07),transparent 0 20%);
  filter:blur(9px);
}
.b121-mini-brain-canvas{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  display:block!important;
  z-index:2!important;
  pointer-events:none!important;
  filter:saturate(1.22) contrast(1.06);
}
.b121-mini-pair{
  position:absolute;
  right:7px;
  bottom:6px;
  z-index:4;
  padding:2px 5px;
  border:1px solid rgba(78,210,255,.24);
  border-radius:999px;
  background:rgba(2,10,18,.72);
  color:#85e8ff;
  font:800 7px/1 Inter,system-ui,sans-serif;
  letter-spacing:.08em;
  box-shadow:0 0 10px rgba(55,200,255,.06);
}
.b121-trader-brain .mini-brain-top{
  background:linear-gradient(90deg,rgba(8,28,47,.82),rgba(18,12,48,.72))!important;
}
.b121-trader-brain .mini-brain-top b{
  color:#9feaff!important;
}
.b121-trader-brain .mini-brain-open{
  color:#8fc9dc!important;
  background:rgba(2,7,15,.72)!important;
}
@media(max-height:820px) and (min-width:1000px){
  .b121-trader-brain{min-height:128px!important}
  .b121-mini-brain-stage{height:77px!important}
}



/* ===== QLYRA B122 · JOURNAL + ALERT FUSION ===== */
.b122-journal-head-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;
}
.b122-auto-chip{
  min-height:29px;padding:5px 8px;border-radius:999px;
  border:1px solid rgba(91,151,184,.28);
  background:rgba(5,18,29,.82);color:#7898aa;
  font-size:8px;font-weight:850;letter-spacing:.07em;cursor:pointer;
}
.b122-auto-chip.active{
  color:#76f2d1;border-color:rgba(50,224,178,.48);
  background:rgba(20,130,102,.10);
  box-shadow:0 0 12px rgba(31,225,173,.06);
}
.b122-entry-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.b122-entry-title h4{margin:0}
.b122-source{
  display:inline-flex;align-items:center;min-height:18px;padding:2px 6px;border-radius:999px;
  font-size:7px;font-weight:900;letter-spacing:.08em;
  border:1px solid rgba(86,171,212,.24);color:#83b9d0;background:rgba(6,24,36,.72);
}
.b122-source.auto{
  color:#7ff3d5;border-color:rgba(42,218,171,.34);background:rgba(15,113,89,.10);
}
.b122-auto-entry{
  border-left:2px solid rgba(50,221,181,.32)!important;
}
.b122-result{color:#8fd7e8!important}
.b122-fusion-box{
  border-color:rgba(84,101,220,.25)!important;
  background:linear-gradient(135deg,rgba(16,44,68,.20),rgba(55,27,91,.16))!important;
}
@media(max-width:900px){
  .b122-journal-head-actions{width:100%;justify-content:flex-start}
  .b122-auto-chip{font-size:7px;padding:4px 6px}
}



/* ===== QLYRA B123 · TRADE ENTRY + RESPONSIVE EXECUTION FIX ===== */

/* Full desktop: make the right-hand execution instrument slightly larger and more legible. */
@media (min-width:1351px){
  .terminal-grid{
    grid-template-columns:200px minmax(420px,1fr) 220px 270px!important;
  }
}
@media (min-width:1101px) and (max-width:1350px){
  .terminal-grid{
    grid-template-columns:170px minmax(340px,1fr) 188px 258px!important;
  }
}

/* Execution panel legibility. */
.trade-panel{
  padding:10px!important;
  gap:8px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.trade-panel .trade-tabs button,
.trade-panel .order-type-tabs button,
.trade-panel .quick-size button{
  font-size:10.5px!important;
  min-height:30px!important;
}
.trade-panel .trade-select{
  font-size:10.5px!important;
  min-height:31px!important;
}
.trade-panel .available-row,
.trade-panel .trade-field span,
.trade-panel .risk-grid span{
  font-size:9.5px!important;
}
.trade-panel .trade-field input,
.trade-panel .risk-grid input{
  min-height:34px!important;
  font-size:11.5px!important;
}
.trade-panel .ai-approval{
  font-size:9.5px!important;
  padding:9px!important;
}
.trade-panel .trade-actions button{
  min-height:38px!important;
  font-size:11.5px!important;
}
.trade-panel .authorize-btn{
  min-height:38px!important;
  font-size:10.5px!important;
}
.trade-panel .trade-note{
  font-size:8.8px!important;
  line-height:1.35!important;
}

/* Reduced desktop:
   - remove redundant Markets dock from Trader
   - keep Order Entry visible on the RIGHT instead of sending it below the chart
   - chart remains the primary surface
*/
@media (max-width:1100px) and (min-width:721px){
  .layout{
    grid-template-columns:108px minmax(0,1fr)!important;
  }
  .layout>aside{
    width:108px!important;min-width:108px!important;max-width:108px!important;
  }

  .terminal-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 258px!important;
    grid-template-rows:minmax(500px,calc(100vh - 245px)) 150px auto!important;
    grid-template-areas:
      "chart trade"
      "positions trade"
      "book trade"!important;
    gap:7px!important;
    height:auto!important;
    min-height:0!important;
  }
  .terminal-grid>.market-dock{
    display:none!important;
  }
  .terminal-grid>.chart-terminal{
    grid-area:chart!important;
    min-width:0!important;
    width:100%!important;
    height:auto!important;
    min-height:500px!important;
  }
  .terminal-grid>.trade-panel{
    grid-area:trade!important;
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    min-height:500px!important;
    max-height:calc(100vh - 66px)!important;
    position:sticky!important;
    top:0!important;
    align-self:start!important;
    overflow-y:auto!important;
    z-index:4!important;
  }
  .terminal-grid>.positions-terminal{
    grid-area:positions!important;
    min-height:145px!important;
    max-height:190px!important;
    overflow:auto!important;
  }
  .terminal-grid>.orderbook-panel{
    grid-area:book!important;
    min-height:330px!important;
    max-height:420px!important;
    overflow:hidden!important;
  }

  .pair-strip{
    grid-template-columns:minmax(120px,auto) minmax(0,1fr) auto!important;
  }
  .pair-metrics{
    grid-template-columns:repeat(4,minmax(58px,1fr))!important;
  }
}

/* Narrow window: Order Entry must still remain present immediately after the chart. */
@media (max-width:720px){
  .terminal-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:
      "chart"
      "trade"
      "positions"
      "book"!important;
    gap:7px!important;
  }
  .terminal-grid>.market-dock{display:none!important}
  .terminal-grid>.trade-panel{
    grid-area:trade!important;
    display:flex!important;
    min-height:auto!important;
    max-height:none!important;
    position:static!important;
    overflow:visible!important;
  }
  .terminal-grid>.chart-terminal{
    min-height:500px!important;
    height:500px!important;
  }
}


/* ===== QLYRA B124 · DEMO GATE FLOW FIX ===== */
.authorize-btn.b124-reviewed{
  border-color:rgba(48,223,174,.64)!important;
  background:linear-gradient(90deg,rgba(16,132,103,.92),rgba(27,158,205,.92))!important;
  color:#efffff!important;
  box-shadow:0 0 15px rgba(44,220,180,.13)!important;
}
.trade-panel .trade-actions button{
  position:relative;
}
.trade-panel .trade-actions button::after{
  content:"DEMO";
  position:absolute;
  right:6px;
  top:4px;
  font-size:6px;
  font-weight:900;
  letter-spacing:.08em;
  opacity:.52;
}
@media(max-width:1100px) and (min-width:721px){
  .terminal-grid{
    grid-template-columns:minmax(0,1fr) 268px!important;
  }
  .terminal-grid>.trade-panel{
    min-width:268px!important;
  }
}

/* ===== QLYRA B125 · HEADER MIC ANCHOR FIX ===== */
.header-voice-btn{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  flex:0 0 auto!important;
}
.header-voice-btn .header-voice-icon{
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  transform:none!important;
}
.header-voice-btn .header-voice-label{
  position:static!important;
  white-space:nowrap!important;
}
@media(max-width:1100px){
  .b80-header-left .header-voice-btn{
    position:relative!important;
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
    margin:0!important;
    flex:0 0 38px!important;
    display:grid!important;
    place-items:center!important;
    color:inherit!important;
    overflow:hidden!important;
  }
  .b80-header-left .header-voice-btn::before{
    content:none!important;
    display:none!important;
  }
  .b80-header-left .header-voice-btn .header-voice-icon{
    display:grid!important;
    place-items:center!important;
    position:static!important;
    width:100%!important;
    height:100%!important;
    font-size:14px!important;
    line-height:1!important;
    transform:none!important;
  }
  .b80-header-left .header-voice-btn .header-voice-label{
    display:none!important;
  }
  .b80-header-left{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
  }
  .b81-search-wrap{
    min-width:0!important;
    flex:1 1 auto!important;
  }
}
@media(max-width:720px){
  .b80-header-left .brand{min-width:98px!important;flex-basis:98px!important}
  .b80-header-left .header-voice-btn{
    width:34px!important;min-width:34px!important;max-width:34px!important;flex-basis:34px!important;
  }
}

/* ===== B125 · COINBASE CORE ===== */
.b125-provider-roadmap{
  display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:8px 0 12px;
}
.b125-provider-roadmap>div{
  padding:9px;border:1px solid rgba(69,130,160,.22);border-radius:10px;
  background:rgba(4,18,29,.62);
}
.b125-provider-roadmap>div.active{
  border-color:rgba(42,218,171,.35);background:rgba(11,94,75,.10);
}
.b125-provider-roadmap span{
  display:block;font-size:7px;letter-spacing:.11em;color:#6594aa;margin-bottom:4px;
}
.b125-provider-roadmap b{display:block;font-size:11px;color:#d9f6ff}
.b125-provider-roadmap small{display:block;font-size:8px;color:#7192a5;margin-top:3px}
.b125-provider-planned{opacity:.72}
.exchange-card[data-provider="coinbase"]{
  border-color:rgba(50,223,174,.30)!important;
}

/* ===== QLYRA B126 · 5X–200X + POSITION MANAGER ===== */
.b126-risk-controls{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:6px!important;
  align-items:center!important;
}
.b126-risk-controls .trade-select{
  height:32px!important;
  min-height:32px!important;
  border-radius:8px!important;
  padding:0 8px!important;
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:center!important;
  gap:5px!important;
  text-align:left!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.b126-risk-controls .trade-select span{
  font-size:7px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:#6f94a8!important;
}
.b126-risk-controls .trade-select b{
  font-size:10.5px!important;
  color:#daf7ff!important;
  text-align:center!important;
}
.b126-risk-controls .trade-select i{
  font-style:normal!important;
  font-size:8px!important;
  color:#6fb4d0!important;
}
.b126-leverage-wrap{position:relative;min-width:0}
.b126-leverage-control{width:100%!important}
.b126-leverage-menu{
  position:absolute;
  z-index:40;
  right:0;
  top:36px;
  width:230px;
  max-height:220px;
  overflow:auto;
  padding:7px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:5px;
  border:1px solid rgba(64,187,232,.42);
  border-radius:10px;
  background:rgba(2,12,22,.98);
  box-shadow:0 18px 45px rgba(0,0,0,.45),0 0 20px rgba(34,164,218,.08);
}
.b126-leverage-menu.hidden{display:none!important}
.b126-leverage-menu button{
  min-height:28px;
  border-radius:7px;
  border:1px solid rgba(72,142,174,.24);
  background:rgba(7,26,40,.92);
  color:#a8d7e8;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.b126-leverage-menu button:hover,
.b126-leverage-menu button.active{
  color:#efffff;
  border-color:#42d9ff;
  background:linear-gradient(135deg,rgba(17,115,159,.78),rgba(87,56,187,.72));
}
.b126-position-manager{width:min(720px,calc(100vw - 24px))!important}
.b126-pm-meta{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
.b126-pm-live-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:10px 0;
}
.b126-pm-live-grid>div{
  border:1px solid rgba(65,138,172,.25);
  border-radius:9px;padding:9px;background:rgba(4,18,29,.68);
}
.b126-pm-live-grid span{
  display:block;font-size:7px;text-transform:uppercase;letter-spacing:.09em;color:#678fa3;margin-bottom:5px;
}
.b126-pm-live-grid b{font-size:13px;color:#dff8ff}
.b126-partial-close{margin:10px 0}
.b126-partial-close>span{
  display:block;font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:#7799aa;margin-bottom:6px;
}
.b126-partial-close>div{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.b126-partial-close button{
  min-height:32px;border-radius:8px;border:1px solid rgba(79,153,190,.30);
  background:rgba(5,22,35,.90);color:#a9d8e8;font-size:9px;font-weight:850;cursor:pointer;
}
.b126-partial-close button:hover{border-color:#ff6489;color:#fff;background:rgba(139,34,65,.24)}
.b83-position-pnl.positive,#pmLivePnl.positive{color:#46ebbd!important}
.b83-position-pnl.negative,#pmLivePnl.negative{color:#ff6b88!important}
@media(max-width:720px){
  .b126-risk-controls{grid-template-columns:1fr 1fr!important}
  .b126-leverage-menu{right:0;width:min(230px,76vw);grid-template-columns:repeat(4,1fr)}
  .b126-pm-live-grid{grid-template-columns:1fr 1fr}
}

/* ===== QLYRA B127 · CUSTOM LEVERAGE + ORDER MANAGER ===== */
.b126-leverage-menu{width:260px!important;grid-template-columns:1fr!important;max-height:none!important}
.b127-leverage-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
.b127-custom-leverage{margin-top:7px;padding-top:7px;border-top:1px solid rgba(79,153,190,.20)}
.b127-custom-leverage label{display:block;margin-bottom:5px;color:#84a9ba;font-size:8px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.b127-custom-leverage>div{display:grid;grid-template-columns:minmax(0,1fr) 60px;gap:5px}
.b127-custom-leverage input{width:100%;min-width:0;height:31px;border-radius:7px;border:1px solid rgba(72,142,174,.30);background:#061522;color:#e9fbff;padding:0 8px;font-size:11px;font-weight:800;outline:none}
.b127-custom-leverage input:focus{border-color:#43dfff;box-shadow:0 0 0 2px rgba(67,223,255,.08)}
.b127-custom-leverage button{min-height:31px!important;border-radius:7px!important;border:1px solid rgba(66,217,255,.42)!important;background:linear-gradient(135deg,rgba(18,111,151,.88),rgba(79,52,170,.82))!important;color:#efffff!important;font-size:8px!important;font-weight:850!important}
.b127-custom-leverage small{display:block;margin-top:5px;color:#68899a;font-size:7px}
.b127-order-manager-card{width:min(680px,calc(100vw - 24px))!important}
.b127-order-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:10px 0}
.b127-order-summary>div{border:1px solid rgba(68,140,173,.24);border-radius:9px;padding:9px;background:rgba(4,18,29,.66)}
.b127-order-summary span{display:block;font-size:7px;color:#6f94a8;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.b127-order-summary b{font-size:11px;color:#dff8ff}
.b83-order-actions{display:flex!important;gap:4px!important;align-items:center!important}
.b83-order-actions .b127-manage-order{border-color:rgba(71,210,255,.30)!important;color:#91dff2!important}
@media(max-width:720px){.b126-leverage-menu{width:min(260px,82vw)!important}.b127-order-summary{grid-template-columns:1fr 1fr}}

/* ===== QLYRA B128 · RISK ENGINE / AUTO TP-SL ===== */
#b127LeverageInput.b128-invalid{
  border-color:#ff6687!important;
  box-shadow:0 0 0 2px rgba(255,102,135,.08)!important;
}
.b128-risk-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;
  margin:0 0 10px;
}
.b128-risk-grid>div{
  border:1px solid rgba(74,144,177,.23);
  border-radius:9px;
  padding:8px;
  background:rgba(5,19,30,.62);
}
.b128-risk-grid span{
  display:block;
  color:#7195a7;
  font-size:7px;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:4px;
}
.b128-risk-grid b{display:block;color:#dff8ff;font-size:11px}
.b128-risk-grid small{display:block;color:#607f90;font-size:7px;margin-top:3px}
.b128-risk-grid b.b128-armed{color:#72efcc!important}
@media(max-width:720px){
  .b128-risk-grid{grid-template-columns:1fr 1fr}
}

/* ===== QLYRA B129 · DEMO PERFORMANCE ANALYTICS ===== */
.b129-performance-card{
  margin:8px 0 12px;
  border:1px solid rgba(61,142,179,.25);
  border-radius:12px;
  padding:10px;
  background:linear-gradient(180deg,rgba(5,20,32,.82),rgba(4,14,24,.66));
}
.b129-performance-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;
}
.b129-performance-head>div>span{
  display:block;font-size:7px;letter-spacing:.12em;color:#44d7ff;margin-bottom:3px;
}
.b129-performance-head>div>b{display:block;color:#def8ff;font-size:12px}
.b129-performance-head>div>small{display:block;color:#6f8e9f;font-size:8px;margin-top:2px}
.b129-performance-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;
}
.b129-performance-grid article{
  min-width:0;border:1px solid rgba(73,140,173,.20);border-radius:9px;padding:8px;background:rgba(3,17,27,.72);
}
.b129-performance-grid article>span{
  display:block;font-size:7px;text-transform:uppercase;letter-spacing:.08em;color:#6f93a5;margin-bottom:4px;
}
.b129-performance-grid article>b{display:block;font-size:13px;color:#dcf8ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b129-performance-grid article>small{display:block;font-size:7px;color:#607f90;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b129-performance-lower{
  display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,.7fr);gap:8px;margin-top:8px;
}
.b129-equity-panel,.b129-position-bias{
  border:1px solid rgba(73,140,173,.20);border-radius:9px;padding:8px;background:rgba(3,17,27,.68);
}
.b129-equity-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:3px}
.b129-equity-title span,.b129-position-bias>span{font-size:7px;letter-spacing:.09em;color:#6f93a5}
.b129-equity-title b{font-size:11px;color:#dff8ff}
#b129EquitySvg{width:100%;height:86px;display:block;overflow:visible}
#b129EquityLine{fill:none;stroke:#42ddff;stroke-width:2;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 4px rgba(66,221,255,.32))}
.b129-equity-axis{display:flex;justify-content:space-between;color:#5f8194;font-size:7px}
.b129-position-bias>div{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:7px 0}
.b129-position-bias p{margin:0;padding:6px;border:1px solid rgba(73,140,173,.16);border-radius:7px;background:rgba(4,21,33,.65)}
.b129-position-bias p span{display:block;color:#688a9c;font-size:7px}
.b129-position-bias p b{display:block;color:#dff8ff;font-size:12px;margin-top:2px}
.b129-position-bias>small{display:block;color:#5f8194;font-size:7px}
@media(max-width:1100px){
  .b129-performance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .b129-performance-lower{grid-template-columns:1fr}
}
@media(max-width:720px){
  .b129-performance-head{align-items:flex-start}
  .b129-performance-grid{grid-template-columns:1fr 1fr}
}

/* ===== QLYRA B130 · UNIFIED CONTEXT ENGINE ===== */
.b130-context-strip{
  display:grid;
  grid-template-columns:120px 90px 100px minmax(180px,1fr) auto;
  gap:6px;
  align-items:center;
  margin:0 0 8px;
  padding:7px;
  border:1px solid rgba(58,135,168,.22);
  border-radius:10px;
  background:linear-gradient(90deg,rgba(4,18,29,.82),rgba(7,22,36,.68));
}
.b130-context-strip>div{
  min-width:0;
  padding:5px 7px;
  border-right:1px solid rgba(75,136,164,.14);
}
.b130-context-strip>div:last-of-type{border-right:0}
.b130-context-strip span{
  display:block;
  font-size:6.5px;
  letter-spacing:.10em;
  color:#638a9d;
  margin-bottom:3px;
}
.b130-context-strip b{
  display:block;
  font-size:9px;
  color:#dff9ff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.b130-context-reason b{color:#8edff2}
.b130-context-engine{
  margin:0 0 10px;
  padding:10px;
}
.b130-context-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.b130-context-head span{font-size:7px;letter-spacing:.12em;color:#43dfff}
.b130-context-head h3{margin:3px 0 2px;font-size:14px;color:#e2faff}
.b130-context-head p{margin:0;color:#688a9c;font-size:8px}
.b130-context-summary{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin:9px 0;
}
.b130-context-summary>div{
  padding:7px;
  border:1px solid rgba(67,139,172,.20);
  border-radius:8px;
  background:rgba(4,18,29,.64);
  min-width:0;
}
.b130-context-summary span{display:block;font-size:6.5px;color:#678b9d;letter-spacing:.08em;margin-bottom:3px}
.b130-context-summary b{display:block;font-size:9px;color:#dcf8ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b130-event-timeline{
  max-height:210px;
  overflow:auto;
  border-top:1px solid rgba(69,136,165,.14);
  padding-top:5px;
}
.b130-event-row{
  display:grid;
  grid-template-columns:64px 62px 90px minmax(0,1fr) 70px;
  gap:6px;
  align-items:center;
  padding:6px 4px;
  border-bottom:1px solid rgba(64,125,153,.11);
}
.b130-event-row>span{font-size:7px;color:#5e8193}
.b130-event-row>b{font-size:7px;color:#44dfff}
.b130-event-row>strong{font-size:8px;color:#dff8ff}
.b130-event-row>p{margin:0;font-size:8px;color:#8eafbd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b130-event-row>em{font-style:normal;font-size:7px;color:#6d8290;text-align:right}
.b130-event-empty{padding:16px;text-align:center;color:#5d7c8d;font-size:8px}
.b130-timeline-modal-card{width:min(780px,calc(100vw - 24px))!important}
.b130-event-timeline-modal{max-height:52vh!important}
@media(max-width:1100px){
  .b130-context-strip{grid-template-columns:1fr 80px 90px minmax(140px,1fr) auto}
}
@media(max-width:720px){
  .b130-context-strip{grid-template-columns:1fr 1fr;gap:5px}
  .b130-context-strip .b130-context-reason{grid-column:1 / -1}
  .b130-context-strip button{grid-column:1 / -1}
  .b130-context-summary{grid-template-columns:1fr 1fr}
  .b130-event-row{grid-template-columns:52px 58px 72px minmax(0,1fr)}
  .b130-event-row>em{display:none}
}

/* ===== QLYRA B134 · RESPONSIVE TRADER VIEWPORT FIT =====
   Desktop invariant: Context strip + terminal must share the available viewport.
   The terminal no longer claims 100% height in addition to the context strip.
*/
@media (min-width:1101px){
  html,body,#app{
    height:100%;
    min-height:0;
    overflow:hidden;
  }

  header{
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;
    padding:6px 10px!important;
  }

  .layout{
    height:calc(100dvh - 54px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .layout>aside{
    min-height:0!important;
    height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    scrollbar-width:thin;
  }

  .layout>main,
  main{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  .view#dashboard{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }

  .view#dashboard>.b130-context-strip{
    flex:0 0 auto!important;
    margin:0 0 5px!important;
  }

  .view#dashboard>.terminal-grid{
    flex:1 1 auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:hidden!important;
    grid-template-columns:
      clamp(170px,13vw,200px)
      minmax(0,1fr)
      clamp(188px,14vw,220px)
      clamp(248px,17.5vw,270px)!important;
    grid-template-rows:minmax(0,1fr) 116px!important;
    gap:5px!important;
  }

  .terminal-grid>.market-dock,
  .terminal-grid>.chart-terminal,
  .terminal-grid>.orderbook-panel,
  .terminal-grid>.trade-panel,
  .terminal-grid>.positions-terminal{
    min-width:0!important;
    min-height:0!important;
    max-height:100%!important;
  }

  .terminal-grid>.market-dock,
  .terminal-grid>.orderbook-panel,
  .terminal-grid>.trade-panel{
    height:100%!important;
  }

  .terminal-market-list,
  .position-panel,
  .trade-panel{
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }

  .positions-terminal{
    overflow:hidden!important;
  }

  .positions-terminal .position-panel{
    min-height:0!important;
    max-height:calc(100% - 34px)!important;
    overflow:auto!important;
  }

  .chart-terminal,
  #priceChart,
  .tv-chart-shell,
  .qlyra-tv-widget,
  .qlyra-tv-widget>.tradingview-widget-container__widget,
  .qlyra-tv-widget iframe{
    min-height:0!important;
    max-height:100%!important;
  }
}

/* Laptop-height desktop: preserve every functional region without page overflow. */
@media (min-width:1101px) and (max-height:900px){
  .view#dashboard>.terminal-grid{
    grid-template-rows:minmax(0,1fr) 104px!important;
  }
  .b130-context-strip{
    padding:5px 7px!important;
    margin-bottom:4px!important;
  }
  .b130-context-strip>div{padding:3px 6px!important}
  .pair-strip{min-height:43px!important;padding-top:4px!important;padding-bottom:4px!important}
  .chart-tabs-row{padding-top:3px!important;padding-bottom:3px!important}
  .chart-legend{min-height:18px!important;padding-top:2px!important;padding-bottom:2px!important}
  .trade-panel{gap:6px!important;padding-top:7px!important;padding-bottom:7px!important}
  .b121-trader-brain{min-height:118px!important}
  .b121-mini-brain-stage{height:68px!important}
}

/* ===== QLYRA B135 · ADAPTIVE WINDOW + MULTI-ORDER WATCH ===== */
.b135-auto-watch{
  margin-left:auto;padding:3px 6px;border-radius:999px;font-style:normal;
  font-size:6.8px;font-weight:900;letter-spacing:.07em;white-space:nowrap;
  color:#74d9f4;border:1px solid rgba(83,191,222,.28);background:rgba(8,72,94,.12);
}
.b135-auto-watch.is-live{color:#72efcc;border-color:rgba(57,222,181,.38);background:rgba(23,126,98,.10)}
.b135-auto-watch.is-warn{color:#ffc66f;border-color:rgba(255,190,75,.34);background:rgba(145,95,17,.10)}
.b135-auto-watch.is-off{color:#8ca1af;border-color:rgba(120,140,150,.22);background:rgba(80,95,105,.08)}
.b135-book-toggle,.b135-book-close{display:none}

/* Reduced desktop / split-window mode. Fits in the viewport instead of creating
   a desktop-sized page inside a smaller Chrome window. */
@media (min-width:721px) and (max-width:1100px){
  html,body,#app{height:100%;min-height:0!important;overflow:hidden!important}
  header{
    height:50px!important;min-height:50px!important;max-height:50px!important;
    padding:5px 7px!important;gap:4px!important;overflow:hidden!important;
  }
  .b80-header-left{min-width:0!important;flex:1 1 auto!important}
  .b80-header-left .brand{min-width:74px!important;max-width:74px!important;flex-basis:74px!important}
  .b80-header-left .brand .logo{font-size:23px!important}
  .b80-header-left .brand b{font-size:9px!important;letter-spacing:2px!important}
  .b80-header-left .brand small{display:none!important}
  .b80-header-left .header-voice-btn{width:31px!important;min-width:31px!important;max-width:31px!important;height:31px!important;min-height:31px!important;flex-basis:31px!important}
  .b81-search-wrap{min-width:90px!important;max-width:none!important;width:auto!important;flex:1 1 auto!important}
  .b80-header-left #globalSearch{height:31px!important;min-width:90px!important;font-size:9px!important}
  .b80-header-right{gap:3px!important;flex:0 0 auto!important}
  .b80-header-right .theme-switch button{min-width:28px!important;padding:5px 4px!important;font-size:0!important}
  .b80-header-right .theme-switch button::first-letter{font-size:10px}
  .b80-header-right .lang-switch button{min-width:27px!important;padding:5px 4px!important;font-size:8px!important}
  #qlyraBuildBadge{padding:4px 6px!important;font-size:7.5px!important}
  .b80-header-right .role-pill{display:none!important}
  .b80-header-right #logoutBtn{padding:5px 6px!important;font-size:8px!important}

  .layout{
    height:calc(100dvh - 50px)!important;min-height:0!important;
    display:grid!important;grid-template-columns:58px minmax(0,1fr)!important;
    gap:4px!important;padding:4px!important;overflow:hidden!important;
  }
  .layout>aside{
    width:58px!important;min-width:58px!important;max-width:58px!important;height:100%!important;
    padding:5px!important;gap:4px!important;overflow-y:auto!important;overflow-x:hidden!important;
  }
  .layout>aside .nav{
    width:100%!important;height:38px!important;min-height:38px!important;flex:0 0 38px!important;
    padding:0!important;font-size:0!important;color:transparent!important;
  }
  .layout>aside .nav::before{left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:20px!important;height:20px!important}
  .layout>main,main{height:100%!important;min-height:0!important;overflow:hidden!important;padding:0!important}
  .view#dashboard:not(.hidden){height:100%!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .view#dashboard>.b130-context-strip{
    flex:0 0 36px!important;min-height:36px!important;max-height:36px!important;
    margin:0 0 4px!important;padding:4px 6px!important;overflow:hidden!important;
    grid-template-columns:minmax(82px,1fr) 66px 70px auto!important;
  }
  .b130-context-strip>div{padding:2px 5px!important;min-width:0!important}
  .b130-context-strip>div span{font-size:5.8px!important}
  .b130-context-strip>div b{font-size:8.5px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .b130-context-strip .b130-context-reason{display:none!important}
  #b130OpenTimeline{height:26px!important;min-height:26px!important;padding:4px 8px!important;font-size:8px!important}

  .view#dashboard>.terminal-grid{
    flex:1 1 auto!important;height:auto!important;min-height:0!important;overflow:hidden!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) clamp(220px,31vw,248px)!important;
    grid-template-rows:minmax(0,1fr) 112px!important;
    grid-template-areas:"chart trade" "positions trade"!important;
    gap:5px!important;margin:0!important;
  }
  .terminal-grid>.market-dock,.terminal-grid>.orderbook-panel{display:none!important}
  .terminal-grid>.chart-terminal{grid-area:chart!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  .terminal-grid>.positions-terminal{grid-area:positions!important;width:100%!important;height:112px!important;min-height:0!important;max-height:112px!important;overflow:hidden!important}
  .terminal-grid>.positions-terminal .position-panel{max-height:78px!important;min-height:0!important;overflow:auto!important}
  .terminal-grid>.trade-panel{
    grid-area:trade!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;
    position:static!important;overflow-y:auto!important;overflow-x:hidden!important;align-self:stretch!important;
    padding:7px!important;gap:5px!important;
  }
  .trade-panel .b121-trader-brain,.trade-panel .brain-context{display:none!important}
  .trade-panel .b82-exec-stage{gap:4px!important;flex-wrap:wrap!important;margin-bottom:2px!important;padding:5px!important}
  .trade-panel .b82-exec-stage b{font-size:7px!important}
  .b135-auto-watch{font-size:6px!important;padding:2px 5px!important}
  .trade-panel .trade-tabs button,.trade-panel .order-type-tabs button,.trade-panel .quick-size button{min-height:27px!important;font-size:9px!important}
  .trade-panel .trade-select{min-height:28px!important;font-size:9px!important}
  .trade-panel .trade-field input,.trade-panel .risk-grid input{min-height:30px!important;font-size:10px!important}
  .trade-panel .trade-actions button,.trade-panel .authorize-btn{min-height:34px!important}

  .pair-strip{grid-template-columns:minmax(112px,145px) minmax(0,1fr) auto!important;padding:4px 6px!important;gap:4px!important}
  .pair-identity{min-width:0!important;max-width:145px!important}
  .pair-metrics{grid-template-columns:repeat(2,minmax(58px,1fr))!important;gap:2px!important}
  .pair-stat{padding:1px 3px!important}
  .pair-stat small{font-size:6px!important}.pair-stat b{font-size:8.5px!important}
  .chart-tabs-row{min-height:31px!important;padding:3px 5px!important}
  .chart-tabs button,.timeframe-toolbar button{font-size:7px!important;padding:3px 5px!important}
  .chart-legend{min-height:18px!important;padding:2px 6px!important;font-size:6.8px!important}
  #priceChart,.tv-chart-shell,.qlyra-tv-widget,.qlyra-tv-widget>.tradingview-widget-container__widget,.qlyra-tv-widget iframe{min-height:0!important;height:100%!important;max-height:100%!important}

  .b135-book-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:38px!important;padding:3px 5px!important;font-size:7px!important}
  body.b135-book-open .terminal-grid>.orderbook-panel{
    display:flex!important;position:fixed!important;z-index:1400!important;
    left:67px!important;right:258px!important;top:92px!important;bottom:126px!important;
    width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;
    box-shadow:0 18px 50px rgba(0,0,0,.52)!important;overflow:hidden!important;
  }
  body.b135-book-open::after{content:"";position:fixed;z-index:1390;left:62px;right:253px;top:50px;bottom:4px;background:rgba(0,5,10,.34);backdrop-filter:blur(1px);pointer-events:none}
  body.b135-book-open .orderbook-panel{pointer-events:auto!important}
  .b135-book-close{display:inline-flex!important;margin-left:auto!important;width:24px!important;height:24px!important;align-items:center!important;justify-content:center!important;padding:0!important;font-size:10px!important}
}

/* Very narrow window: keep application chrome fixed; scroll only the working
   surface. Order Book remains available as a drawer instead of expanding page width. */
@media (max-width:720px){
  html,body,#app{height:100%;overflow:hidden!important}
  header{height:48px!important;min-height:48px!important;max-height:48px!important;padding:4px!important}
  .b80-header-left .brand{min-width:54px!important;max-width:54px!important;flex-basis:54px!important}
  .b80-header-left .brand>div:last-child{display:none!important}
  .b80-header-right .theme-switch,.b80-header-right .role-pill{display:none!important}
  #qlyraBuildBadge{font-size:6.5px!important;padding:3px 4px!important}
  .layout{height:calc(100dvh - 48px)!important;min-height:0!important;grid-template-columns:50px minmax(0,1fr)!important;padding:3px!important;gap:3px!important;overflow:hidden!important}
  .layout>aside{width:50px!important;min-width:50px!important;max-width:50px!important;padding:4px!important;overflow-y:auto!important}
  .layout>aside .nav{height:36px!important;min-height:36px!important;padding:0!important;font-size:0!important;color:transparent!important}
  .layout>aside .nav::before{left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:19px!important;height:19px!important}
  main,.layout>main{height:100%!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
  .view#dashboard{height:auto!important;min-height:100%!important;overflow:visible!important}
  .b130-context-strip{grid-template-columns:1fr 56px auto!important;min-height:34px!important;padding:4px!important}
  .b130-context-strip .b130-context-reason,.b130-context-strip>div:nth-child(3){display:none!important}
  .terminal-grid{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:440px auto 118px!important;grid-template-areas:"chart" "trade" "positions"!important;gap:5px!important;height:auto!important;overflow:visible!important}
  .terminal-grid>.market-dock,.terminal-grid>.orderbook-panel{display:none!important}
  .terminal-grid>.chart-terminal{grid-area:chart!important;height:440px!important;min-height:440px!important;overflow:hidden!important}
  .terminal-grid>.trade-panel{grid-area:trade!important;position:static!important;max-height:none!important;overflow:visible!important;padding:7px!important}
  .terminal-grid>.positions-terminal{grid-area:positions!important;height:118px!important;min-height:118px!important;max-height:118px!important;overflow:hidden!important}
  .trade-panel .b121-trader-brain,.trade-panel .brain-context{display:none!important}
  .pair-strip{grid-template-columns:1fr auto!important}.pair-metrics{grid-column:1/-1!important;grid-template-columns:repeat(2,minmax(58px,1fr))!important}
  .b135-book-toggle{display:inline-flex!important;font-size:7px!important;padding:3px 5px!important}
  body.b135-book-open .terminal-grid>.orderbook-panel{display:flex!important;position:fixed!important;z-index:1500!important;left:56px!important;right:6px!important;top:58px!important;bottom:8px!important;width:auto!important;height:auto!important;max-height:none!important;overflow:hidden!important;box-shadow:0 18px 50px rgba(0,0,0,.58)!important}
  .b135-book-close{display:inline-flex!important;margin-left:auto!important;width:24px!important;height:24px!important;align-items:center!important;justify-content:center!important;padding:0!important}
}


/* ===== QLYRA B136 · POSITION LIFECYCLE + ACTIVITY DOCK ===== */
.b136-dock-controls{display:flex;align-items:center;gap:4px;padding:4px 6px 4px 0;flex:0 0 auto}
.b136-dock-controls button{height:24px;min-width:28px;padding:3px 7px;border:1px solid rgba(62,151,188,.28);border-radius:7px;background:#061725;color:#83cfe5;font-size:8px;font-weight:800;white-space:nowrap}
.b136-dock-controls button:hover{border-color:rgba(56,223,255,.55);color:#d6f7ff}
.positions-terminal{contain:layout paint}
.positions-terminal .b99-terminal-head{position:sticky;top:0;z-index:9;background:linear-gradient(180deg,rgba(5,20,33,.995),rgba(4,16,28,.97));backdrop-filter:blur(8px)}
.positions-terminal .position-panel{overscroll-behavior:contain;scrollbar-width:thin}
.positions-terminal .demo-order{grid-template-columns:minmax(150px,1fr) minmax(72px,92px) auto!important;gap:7px!important;padding:4px 8px!important;min-height:34px!important;font-size:9px!important;align-items:center!important}
.positions-terminal .demo-order>div:first-child{min-width:0!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:4px 7px!important;align-items:center!important}
.positions-terminal .demo-order>div:first-child>b{font-size:9px!important;white-space:nowrap!important}
.positions-terminal .demo-order>div:first-child>small{min-width:0!important;display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:7.5px!important}
.positions-terminal .demo-order>span{font-size:8.5px!important;white-space:nowrap!important}
.positions-terminal .b83-order-actions{display:flex!important;flex-direction:row!important;gap:3px!important;justify-content:flex-end!important;white-space:nowrap!important}
.positions-terminal .b83-order-actions button{padding:3px 5px!important;font-size:7px!important;min-height:22px!important;line-height:1!important}
.positions-terminal .history-entry{grid-template-columns:54px minmax(0,1fr)!important;gap:7px!important;padding:4px 8px!important;min-height:28px!important;font-size:8.5px!important;align-items:center!important}
.positions-terminal .history-entry span{font-size:7.5px!important;white-space:nowrap!important}
.positions-terminal .history-entry b{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:8.5px!important}
.positions-terminal .position-head,.positions-terminal .position-line{padding-top:4px!important;padding-bottom:4px!important;min-height:28px!important}
.positions-terminal.b136-dock-collapsed .position-panel,.positions-terminal.b136-dock-collapsed .b99-private-panel{display:none!important}
.positions-terminal.b136-dock-collapsed .b99-terminal-mode{display:none!important}
.positions-terminal.b136-dock-collapsed .b99-terminal-head{height:34px!important;min-height:34px!important;overflow:hidden!important}
.positions-terminal.b136-dock-expanded .position-panel{max-height:calc(100% - 36px)!important}

.b136-lifecycle-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:12px 16px 4px}
.b136-lifecycle-status>div{display:grid;gap:3px;padding:9px;border:1px solid rgba(56,133,166,.22);border-radius:9px;background:rgba(5,24,38,.72)}
.b136-lifecycle-status span{font-size:8px;color:#78a1b5;text-transform:uppercase;letter-spacing:.07em}
.b136-lifecycle-status b{font-size:12px;color:#b7dce9}.b136-lifecycle-status b.b136-armed{color:#62e5c1}
.b136-lifecycle-status small{font-size:7.5px;color:#618599;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b136-lifecycle-inputs{grid-template-columns:repeat(3,1fr)!important}
.b136-plan-note{margin:0 16px 12px;padding:9px 10px;border:1px solid rgba(56,223,255,.15);border-radius:9px;background:rgba(8,47,65,.20);display:grid;gap:4px}
.b136-plan-note b{font-size:9px;color:#69dff7}.b136-plan-note span{font-size:8px;line-height:1.45;color:#7899aa}

@media (min-width:1101px){
  body[data-b136-dock="compact"] .view#dashboard>.terminal-grid{grid-template-rows:minmax(0,1fr) 138px!important}
  body[data-b136-dock="expanded"] .view#dashboard>.terminal-grid{grid-template-rows:minmax(0,1fr) min(270px,34vh)!important}
  body[data-b136-dock="collapsed"] .view#dashboard>.terminal-grid{grid-template-rows:minmax(0,1fr) 36px!important}
  body[data-b136-dock="compact"] .terminal-grid>.positions-terminal{height:138px!important;max-height:138px!important;min-height:0!important}
  body[data-b136-dock="expanded"] .terminal-grid>.positions-terminal{height:min(270px,34vh)!important;max-height:min(270px,34vh)!important;min-height:0!important}
  body[data-b136-dock="collapsed"] .terminal-grid>.positions-terminal{height:36px!important;max-height:36px!important;min-height:36px!important}
}
@media (min-width:721px) and (max-width:1100px){
  body[data-b136-dock="compact"] .view#dashboard>.terminal-grid{grid-template-rows:minmax(0,1fr) 128px!important}
  body[data-b136-dock="expanded"] .view#dashboard>.terminal-grid{grid-template-rows:minmax(0,1fr) 230px!important}
  body[data-b136-dock="collapsed"] .view#dashboard>.terminal-grid{grid-template-rows:minmax(0,1fr) 36px!important}
  body[data-b136-dock="compact"] .terminal-grid>.positions-terminal{height:128px!important;max-height:128px!important}
  body[data-b136-dock="expanded"] .terminal-grid>.positions-terminal{height:230px!important;max-height:230px!important}
  body[data-b136-dock="collapsed"] .terminal-grid>.positions-terminal{height:36px!important;max-height:36px!important;min-height:36px!important}
  .positions-terminal .demo-order{grid-template-columns:minmax(130px,1fr) 70px auto!important}
  .b136-dock-controls button{padding:3px 5px!important;font-size:7px!important}
}
@media (max-width:720px){
  .b136-lifecycle-status{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}
  .b136-lifecycle-inputs{grid-template-columns:1fr!important}
  .b136-plan-note{margin:0 10px 10px}
  body[data-b136-dock="compact"] .terminal-grid>.positions-terminal{height:132px!important;min-height:132px!important;max-height:132px!important}
  body[data-b136-dock="expanded"] .terminal-grid>.positions-terminal{height:260px!important;min-height:260px!important;max-height:260px!important}
  body[data-b136-dock="collapsed"] .terminal-grid>.positions-terminal{height:36px!important;min-height:36px!important;max-height:36px!important}
  .positions-terminal .demo-order{grid-template-columns:minmax(0,1fr) auto!important}.positions-terminal .demo-order>span{display:none!important}
  .positions-terminal .demo-order>div:first-child{grid-template-columns:1fr!important;gap:2px!important}
  .b99-terminal-mode{display:none!important}
}
/* ===== END B136 CSS ===== */

/* ===== QLYRA B137 · POSITION MANAGER ACTIVATION + RESPONSIVE BALANCE ===== */
.b137-chart-more-wrap{position:relative;display:none;flex:0 0 auto}
.b137-chart-more{min-width:42px!important;padding:3px 6px!important;font-size:7.5px!important;white-space:nowrap!important}
.b137-chart-more-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:1700;width:132px;padding:6px;display:grid;grid-template-columns:1fr 1fr;gap:5px;border:1px solid rgba(64,187,232,.42);border-radius:10px;background:rgba(2,12,22,.985);box-shadow:0 18px 48px rgba(0,0,0,.52)}
.b137-chart-more-menu button{min-height:27px!important;padding:4px 5px!important;border:1px solid rgba(72,142,174,.24)!important;border-radius:7px!important;background:rgba(7,26,40,.95)!important;color:#b8dfee!important;font-size:8px!important}
.b137-chart-more-menu button:hover{border-color:#42d9ff!important;color:#fff!important}

/* Position manager must always sit above adaptive drawers and remain usable on short screens. */
#positionManager.position-manager{z-index:2200!important;overflow:auto!important;align-items:center!important}
#positionManager .position-manager-card{max-height:calc(100dvh - 28px)!important;overflow:auto!important;overscroll-behavior:contain}
#positionRows .manage-position{pointer-events:auto!important;position:relative!important;z-index:3!important}

/* Split-window / reduced desktop: keep labels readable and compact the execution panel
   proportionally instead of shrinking only the chart. */
@media (min-width:721px) and (max-width:1100px){
  .layout{grid-template-columns:96px minmax(0,1fr)!important}
  .layout>aside{width:96px!important;min-width:96px!important;max-width:96px!important;padding:5px!important}
  .layout>aside .nav{
    height:38px!important;min-height:38px!important;padding:4px 5px 4px 29px!important;
    font-size:8px!important;line-height:1.05!important;color:var(--text)!important;text-align:left!important;
    white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  .layout>aside .nav::before{left:5px!important;top:50%!important;transform:translateY(-50%)!important;width:19px!important;height:19px!important}

  .view#dashboard>.terminal-grid{
    grid-template-columns:minmax(0,1fr) clamp(198px,25vw,220px)!important;
    gap:4px!important;
  }
  .terminal-grid>.trade-panel{min-width:0!important;padding:5px!important;gap:4px!important}
  .trade-panel .b82-exec-stage{padding:4px!important;gap:3px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important}
  .trade-panel .b82-exec-stage span{font-size:6.5px!important}
  .trade-panel .b82-exec-stage b{font-size:6.7px!important;line-height:1.15!important;white-space:normal!important;text-align:right!important}
  .trade-panel .b135-auto-watch{grid-column:1/-1!important;justify-self:stretch!important;text-align:center!important;margin-left:0!important}
  .trade-panel .trade-tabs,.trade-panel .order-type-tabs,.trade-panel .quick-size{gap:3px!important}
  .trade-panel .trade-tabs button,.trade-panel .order-type-tabs button,.trade-panel .quick-size button{min-height:24px!important;padding:3px 4px!important;font-size:8px!important}
  .trade-panel .b126-risk-controls{gap:4px!important}
  .trade-panel .b126-risk-controls .trade-select{height:27px!important;min-height:27px!important;padding:0 5px!important}
  .trade-panel .b126-risk-controls .trade-select span{font-size:5.8px!important}
  .trade-panel .b126-risk-controls .trade-select b{font-size:8.5px!important}
  .trade-panel .gate-message{font-size:7px!important;line-height:1.25!important;padding:5px!important}
  .trade-panel .available-row{font-size:8px!important}
  .trade-panel .trade-field{gap:3px!important}
  .trade-panel .trade-field span,.trade-panel .risk-grid span{font-size:7.5px!important}
  .trade-panel .trade-field input,.trade-panel .risk-grid input{min-height:27px!important;padding:5px!important;font-size:9px!important}
  .trade-panel .quick-size button{min-width:0!important}
  .trade-panel .ai-approval{padding:6px!important;font-size:8px!important}
  .trade-panel .trade-actions button,.trade-panel .authorize-btn{min-height:31px!important;font-size:9px!important}
  .trade-panel .trade-note{font-size:7px!important;line-height:1.25!important}

  .pair-strip{grid-template-columns:minmax(105px,135px) minmax(0,1fr) auto!important;padding:3px 5px!important;gap:3px!important}
  .pair-identity{max-width:135px!important;min-width:0!important}
  .pair-name b{font-size:11px!important}.pair-name small{font-size:6.5px!important}
  .pair-metrics{gap:1px!important}.pair-stat small{font-size:5.6px!important}.pair-stat b{font-size:8px!important}
  #openBrainFromTrader{padding:5px 7px!important;font-size:7px!important}

  .chart-tabs-row{display:flex!important;align-items:center!important;gap:3px!important;overflow:visible!important;min-width:0!important}
  .chart-tabs{display:flex!important;gap:2px!important;min-width:0!important;flex:0 1 auto!important;white-space:nowrap!important}
  .timeframe-toolbar{display:flex!important;align-items:center!important;gap:2px!important;min-width:0!important;flex:1 1 auto!important;justify-content:flex-end!important;flex-wrap:nowrap!important;padding:2px!important}
  .chart-tabs button,.timeframe-toolbar button{min-height:23px!important;padding:3px 4px!important;font-size:6.8px!important}
  .chart-tabs [data-chart-tab="overview"],.chart-tabs [data-chart-tab="news"],.chart-tabs [data-chart-tab="data"],
  .timeframe-toolbar [data-tv-interval="30"],.timeframe-toolbar [data-tv-interval="240"],.timeframe-toolbar [data-tv-interval="D"]{display:none!important}
  .b137-chart-more-wrap{display:block!important}
  .timeframe-label,.timeframe-divider{display:none!important}

  body.b135-book-open .terminal-grid>.orderbook-panel{left:105px!important;right:226px!important}
  body.b135-book-open::after{left:100px!important;right:221px!important}
}

/* Extra-tight split window: preserve labels but use shorter rows and a narrower trade rail. */
@media (min-width:721px) and (max-width:860px){
  .layout{grid-template-columns:88px minmax(0,1fr)!important}
  .layout>aside{width:88px!important;min-width:88px!important;max-width:88px!important}
  .layout>aside .nav{font-size:7.2px!important;padding-left:27px!important}
  .view#dashboard>.terminal-grid{grid-template-columns:minmax(0,1fr) 198px!important}
  .pair-metrics .pair-stat:nth-child(3),.pair-metrics .pair-stat:nth-child(4){display:none!important}
  #openBrainFromTrader{font-size:0!important;width:28px!important;min-width:28px!important;padding:0!important}
  #openBrainFromTrader::after{content:'AI';font-size:7px!important}
  .chart-tabs [data-chart-tab="chart"]{font-size:0!important}
  .chart-tabs [data-chart-tab="chart"]::after{content:'Gráfica';font-size:6.8px!important}
  body.b135-book-open .terminal-grid>.orderbook-panel{left:97px!important;right:204px!important}
  body.b135-book-open::after{left:92px!important;right:199px!important}
}

/* True mobile/narrow mode may use icon navigation, but every icon keeps a native tooltip via title/aria-label. */
@media (max-width:720px){
  .b137-chart-more-wrap{display:block!important}
  .chart-tabs [data-chart-tab="overview"],.chart-tabs [data-chart-tab="news"],.chart-tabs [data-chart-tab="data"],
  .timeframe-toolbar [data-tv-interval="30"],.timeframe-toolbar [data-tv-interval="240"],.timeframe-toolbar [data-tv-interval="D"]{display:none!important}
  #positionManager .position-manager-card{width:min(96vw,720px)!important;max-height:calc(100dvh - 14px)!important}
}
/* ===== END B137 CSS ===== */

/* ===== QLYRA B138 · POSITION MANAGER CORE + ADAPTIVE HEADER ===== */
.b138-margin-control{display:grid;gap:5px;margin:10px 16px 2px;padding:10px 12px;border:1px solid rgba(56,133,166,.24);border-radius:10px;background:rgba(4,20,32,.76)}
.b138-margin-control label{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,150px);align-items:center;gap:10px}
.b138-margin-control label span{font-size:9px;color:#87afc1;font-weight:800;letter-spacing:.03em}
.b138-margin-control input{width:100%;min-height:32px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;background:var(--card2);color:var(--text)}
.b138-margin-control small{font-size:7.5px;color:#65899c}

.b138-header-overflow{position:relative;display:none;flex:0 0 auto}
.b138-header-more{height:31px;min-width:52px;padding:5px 8px!important;font-size:9px!important;white-space:nowrap}
.b138-header-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:3200;width:224px;padding:10px;display:grid;gap:9px;border:1px solid rgba(62,177,218,.42);border-radius:12px;background:rgba(2,12,21,.99);box-shadow:0 22px 64px rgba(0,0,0,.58)}
.b138-header-menu-title{display:grid;gap:2px;padding-bottom:7px;border-bottom:1px solid rgba(77,130,155,.22)}
.b138-header-menu-title b{font-size:11px;letter-spacing:2px;color:#d8f7ff}.b138-header-menu-title span{font-size:7px;color:#62dfff}
.b138-header-menu-section{display:grid;gap:5px}.b138-header-menu-section>span{font-size:7px;letter-spacing:.1em;text-transform:uppercase;color:#6e98aa;font-weight:800}
.b138-header-menu-section>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.b138-header-menu-section button{min-width:0;padding:6px 4px!important;font-size:8px!important;background:#061827!important;border:1px solid rgba(73,142,173,.28)!important;color:#bfeaff!important}
#b138HeaderLogout{width:100%;min-height:31px;font-size:9px}

/* Give the header its own responsive system. The Trader no longer has to absorb
   header overflow, and the search is the flexible element instead of every control shrinking. */
@media (min-width:721px) and (max-width:1180px){
  header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:6px!important;height:50px!important;min-height:50px!important;max-height:50px!important;padding:5px 7px!important;overflow:visible!important}
  .b80-header-left{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important;overflow:visible!important}
  .b80-header-left .brand{min-width:82px!important;max-width:82px!important;flex:0 0 82px!important;gap:5px!important}
  .b80-header-left .brand .logo{font-size:25px!important}.b80-header-left .brand b{font-size:9px!important;letter-spacing:2px!important}.b80-header-left .brand small{display:none!important}
  .b80-header-left .header-voice-btn{width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;flex:0 0 32px!important;padding:0!important}
  .b80-header-left .header-voice-label{display:none!important}.b80-header-left .header-voice-icon{font-size:13px!important}
  .b81-search-wrap{flex:1 1 auto!important;min-width:90px!important;max-width:none!important}
  .b80-header-left #globalSearch{width:100%!important;max-width:none!important;min-width:0!important;height:32px!important;padding:6px 9px!important;font-size:9px!important;text-overflow:ellipsis!important}
  .b80-header-right{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;min-width:0!important;overflow:visible!important;white-space:nowrap!important}
  .b80-header-right .theme-switch button{min-width:29px!important;height:30px!important;padding:4px 5px!important;font-size:0!important}
  .b80-header-right .theme-switch button:first-child::after{content:'☀';font-size:10px}.b80-header-right .theme-switch button:nth-child(2)::after{content:'🌙';font-size:10px}.b80-header-right .theme-switch button:nth-child(3)::after{content:'▣';font-size:10px}
  .b80-header-right .lang-switch button{min-width:28px!important;height:30px!important;padding:4px!important;font-size:8px!important}
  #qlyraBuildBadge,.b80-header-right .role-pill,.b80-header-right>#logoutBtn{display:none!important}
  .b138-header-overflow{display:block!important}
}
@media (min-width:721px) and (max-width:930px){
  .b80-header-left .brand{min-width:68px!important;max-width:68px!important;flex-basis:68px!important}.b80-header-left .brand>div:last-child{display:none!important}
  .b80-header-right>.theme-switch,.b80-header-right>.lang-switch{display:none!important}
  .b138-header-more{min-width:58px!important;height:32px!important;font-size:8px!important}
  .b81-search-wrap{min-width:80px!important}
}
@media (max-width:720px){
  header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px!important;overflow:visible!important}
  .b80-header-left{display:flex!important;min-width:0!important;align-items:center!important;gap:4px!important}
  .b81-search-wrap{flex:1 1 auto!important;min-width:70px!important}.b80-header-left #globalSearch{width:100%!important;min-width:0!important}
  .b80-header-right>.theme-switch,.b80-header-right>.lang-switch,#qlyraBuildBadge,.b80-header-right .role-pill,.b80-header-right>#logoutBtn{display:none!important}
  .b138-header-overflow{display:block!important}.b138-header-more{min-width:46px!important;height:30px!important;padding:4px 6px!important;font-size:7.5px!important}.b138-header-menu{position:fixed!important;right:6px!important;top:50px!important;width:min(224px,calc(100vw - 12px))!important}
}
@media (max-width:560px){
  .b80-header-left .brand{display:none!important}.b80-header-left .header-voice-btn{width:30px!important;min-width:30px!important;flex-basis:30px!important}
}

#positionManager[aria-hidden="false"]{display:grid!important}
#positionManager .position-manager-card{isolation:isolate}
@media(max-width:720px){.b138-margin-control{margin:8px 10px 2px;padding:8px}.b138-margin-control label{grid-template-columns:1fr}.b138-margin-control input{min-height:30px}}
/* ===== END B138 CSS ===== */

/* ===== QLYRA B139 · LIFECYCLE PERSISTENCE + PROTECTION SYNC ===== */
/* Position Manager now surfaces unrealized + realized P&L and remaining position
   without growing the modal vertically on desktop. */
.b126-pm-live-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
#pmRealizedPnl.positive{color:#46ebbd!important}#pmRealizedPnl.negative{color:#ff6b88!important}
.positions-terminal .position-protection{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1100px){.b126-pm-live-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.b126-pm-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* ===== END B139 CSS ===== */


/* ===== QLYRA B140 · LIFECYCLE TEST ENGINE + TP VALIDATION ===== */
.b140-lifecycle-test{margin:8px 12px 2px;border:1px solid #1a526c;border-radius:10px;background:linear-gradient(180deg,rgba(7,31,46,.9),rgba(4,22,34,.88));overflow:hidden}
.b140-lifecycle-test summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;color:#d9f8ff;font-size:10px;font-weight:800;letter-spacing:.04em}
.b140-lifecycle-test summary::-webkit-details-marker{display:none}.b140-lifecycle-test summary::after{content:'▾';color:#46e5ff}.b140-lifecycle-test[open] summary::after{content:'▴'}
.b140-lifecycle-test summary em{font-style:normal;font-size:8px;color:#47e6bd;border:1px solid rgba(71,230,189,.35);border-radius:999px;padding:3px 6px;white-space:nowrap}
.b140-test-body{border-top:1px solid rgba(73,202,255,.14);padding:10px}.b140-test-body p{margin:0 0 8px;color:#8fb6c8;font-size:9px;line-height:1.4}
.b140-test-quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.b140-test-quick button{min-width:0;height:31px;padding:5px 7px;border:1px solid #1c607b;border-radius:8px;background:#071f31;color:#a9d6e7;font-size:9px}.b140-test-quick button b{display:block;color:#e9fbff;font-size:9px;overflow:hidden;text-overflow:ellipsis}.b140-test-quick button:disabled{opacity:.35;cursor:not-allowed}
.b140-test-custom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:8px}.b140-test-custom input{min-width:0;height:33px}.b140-test-custom button{height:33px;white-space:nowrap}.b140-test-body>small{display:block;margin-top:7px;color:#6e9bae;font-size:8.5px}.b140-test-body>small.ok{color:#47e6bd}.b140-test-body>small.warn{color:#ffd56a}.b140-test-body>small.bad{color:#ff7891}
@media(max-width:720px){.b140-lifecycle-test{margin:7px 10px 2px}.b140-test-quick{grid-template-columns:repeat(2,minmax(0,1fr))}.b140-test-custom{grid-template-columns:1fr}.b140-test-custom button{width:100%}}
/* ===== END B140 CSS ===== */


/* ===== QLYRA B141 · NAVIGATION CORE REGRESSION GUARD ===== */
#dashboard.hidden{display:none!important}
.view.hidden{display:none!important}
/* ===== END B141 CSS ===== */

/* Independent venue status: wrap provider names and keep mobile cards readable. */
.multi-exchange-card .exchange-brand{min-width:0;display:flex;align-items:center;gap:8px}
.multi-exchange-card .exchange-brand>div{min-width:0}
.multi-exchange-card .exchange-brand b,.multi-exchange-card .exchange-brand small{display:block;overflow-wrap:anywhere}
.multi-exchange-card .exchange-card-head{align-items:flex-start;gap:8px}
.multi-exchange-card .connection-state{font-size:9px;flex-shrink:0}
#multiExchangeSelection{display:grid;gap:12px;margin-top:16px;min-width:0}
#multiExchangeSelection label{display:grid;gap:6px}
#multiDemoAccount{overflow-x:auto;max-width:100%}
#multiDemoAccount table{font-size:12px;border-collapse:collapse;width:100%}
#multiDemoAccount td,#multiDemoAccount th{padding:8px;text-align:left;border-bottom:1px solid #244050}

/* Owner access: iPhone input size avoids automatic Safari zoom. */
#loginEmail,#loginPassword{font-size:16px;min-height:48px}#guestBtn[hidden]{display:none!important}
