/* Qentivor UI Polish R1 | visual-only override; order/strategy logic untouched. */
:root.qvp-ready{--qvp-line:#264263;--qvp-bg:#071322;--qvp-text:#f0f6ff;--qvp-sub:#a7bbd4}
:root.qvp-ready body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;letter-spacing:0;text-rendering:optimizeLegibility}
:root.qvp-ready .page{max-width:1480px;min-width:0}
:root.qvp-ready .panel,:root.qvp-ready .ws-panel{border-radius:16px;min-width:0}
:root.qvp-ready .ws-masthead h1{font-size:clamp(23px,2vw,30px);font-weight:750;letter-spacing:-.65px;line-height:1.18}
:root.qvp-ready .ws-masthead .eyebrow{font-size:10px;letter-spacing:1.5px}
:root.qvp-ready .ws-masthead>div>p:last-child{font-size:12px;line-height:1.5;color:#a8bfd9}
:root.qvp-ready .btn,:root.qvp-ready .qv-v2-mode,:root.qvp-ready #qvs-open{font-weight:650;letter-spacing:0;box-shadow:none;line-height:1.2}
:root.qvp-ready .btn{border-radius:9px;min-height:35px;padding:9px 12px}
:root.qvp-ready .ws-tools{gap:7px}
:root.qvp-ready .ws-tools .btn{font-size:11px;min-height:33px;padding:7px 11px}
:root.qvp-ready .ws-ticker{min-height:68px;padding:10px 12px;border-radius:12px}
:root.qvp-ready .stat{min-height:115px;padding:16px;border-radius:13px}
:root.qvp-ready .stat-value{font-weight:750;letter-spacing:-.5px}
:root.qvp-ready .qv-v2-control-card{padding:16px 18px!important;border-radius:15px!important;background:linear-gradient(115deg,#112640,#151d38 60%,#0d2733)!important}
:root.qvp-ready .qv-v2-control-card .panel-head{margin-bottom:10px}
:root.qvp-ready .ws-v2-bot-actions .btn{min-width:150px;min-height:38px}
:root.qvp-ready .ws-v2-bot-status{font-size:13px}
:root.qvp-ready .qv-v2-market{padding:16px;margin:14px 0 17px;border-radius:15px}
:root.qvp-ready .qv-v2-market-metrics>div{border-radius:11px}
/* Tiny inline information buttons, never tall pills or a second row. */
:root.qvp-ready button.qvs-info,:root.qvp-ready button.qv-v2-help-btn,:root.qvp-ready button.qvp-help,
:root.qvp-ready .qvs-info-small{box-sizing:border-box!important;display:inline-flex!important;vertical-align:middle!important;align-items:center!important;justify-content:center!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;max-height:18px!important;padding:0!important;margin:0 0 0 6px!important;border-radius:50%!important;font:600 11px/1 Arial,sans-serif!important;letter-spacing:0!important;box-shadow:none!important;position:static!important;transform:none!important;background:#13314a!important;border:1px solid #477899!important;color:#89d2fc!important;cursor:pointer!important;overflow:hidden!important}
:root.qvp-ready button.qvs-info:hover,:root.qvp-ready button.qv-v2-help-btn:hover,:root.qvp-ready button.qvp-help:hover{background:#225073!important}
:root.qvp-ready .qvp-title-row{display:flex;align-items:center;gap:2px;flex-wrap:wrap;min-width:0}
:root.qvp-ready .qvp-title-row h2{margin:0!important}
:root.qvp-ready .ws-section-title .qvp-title-row{margin:0 0 4px}
:root.qvp-ready .ws-section-title{gap:10px;align-items:flex-start;margin-bottom:13px}
:root.qvp-ready .ws-section-title>span{width:28px;height:28px}
:root.qvp-ready .ws-section-title h2{font-size:15px;line-height:1.28;font-weight:730}
:root.qvp-ready .ws-section-title p{display:none!important}
:root.qvp-ready .qvs-caption{display:none!important}
:root.qvp-ready .ws-form .field>span{display:flex;align-items:center;flex-wrap:wrap;gap:2px;line-height:1.35;margin:0 0 7px;font-size:12px}
:root.qvp-ready .ws-form .field small.qvp-has-tooltip{display:none!important}
:root.qvp-ready .ws-form .field{min-width:0}
:root.qvp-ready .ws-form .form-grid{gap:16px 15px}
:root.qvp-ready .ws-form-section{margin-bottom:18px;padding:4px 0 17px}
:root.qvp-ready .ws-form .field input,:root.qvp-ready .ws-form .field select{min-width:0;width:100%;min-height:40px;border-radius:9px;font-size:13px}
:root.qvp-ready .ws-form .ws-check{align-items:center;line-height:1.4}
:root.qvp-ready .qv-v2-modebar{padding:9px;gap:8px;border-radius:13px}
:root.qvp-ready .qv-v2-mode{font-size:12px;min-height:38px;padding:9px 13px;border-radius:9px}
:root.qvp-ready .qv-v2-modebar>span{font-size:11px;line-height:1.45}
:root.qvp-ready .qvs-layout .panel{min-height:0!important}
:root.qvp-ready .qvs-layout .qvs-column{gap:14px}
:root.qvp-ready .qvs-layout .empty{min-height:140px}
:root.qvp-ready .ws-dashboard-grid>.panel{min-height:0}
:root.qvp-ready .qvs-layout .ws-chart-wrap{height:320px}
/* Stable desktop navigation on every route, including Positions. */
:root.qvp-ready .sidebar .nav{display:flex;flex-direction:column;gap:0;margin-top:22px;min-height:0;flex:1;overflow-y:auto}
:root.qvp-ready .sidebar .nav .qvp-nav-group{display:flex;flex-direction:column;gap:2px;margin-bottom:13px}
:root.qvp-ready .sidebar .nav .qvp-nav-label{font-size:9px;font-weight:750;letter-spacing:1.4px;text-transform:uppercase;padding:9px 11px 6px;color:#7896b9}
:root.qvp-ready .sidebar .nav button{width:100%;padding:10px 12px;min-height:40px;font-size:11.5px;border-radius:9px;gap:11px}
:root.qvp-ready .sidebar .nav button svg{width:16px;height:16px;flex:none}
:root.qvp-ready .sidebar-foot{padding-top:10px;border-top:1px solid #1c3048;margin-top:0;flex-shrink:0}
/* Pop-up explanations always centered and readable. */
:root.qvp-ready .qvs-info-dialog,:root.qvp-ready .qv-v2-dialog{width:min(440px,calc(100vw - 30px));max-width:calc(100vw - 30px);max-height:calc(100dvh - 40px);overflow:auto;border-radius:15px;padding:19px;line-height:1.55}
/* Compact panel action grouping; original action buttons remain unchanged. */
.qvp-page-actions{margin:0;position:relative;min-width:0}
.qvp-page-actions summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;color:#c7dfff;background:#112640;border:1px solid #305476;border-radius:9px;padding:9px 12px;font-size:12px;font-weight:650}
.qvp-page-actions summary::-webkit-details-marker{display:none}
.qvp-page-actions[open] summary{border-color:#4c88bd}
.qvp-page-actions .ws-tools{display:flex;flex-direction:column;gap:7px;margin-top:8px;padding:12px;background:#09182b;border:1px solid #345373;border-radius:11px}
.qvp-page-actions .ws-tools .btn{min-width:0;justify-content:center}
/* Drawer navigation for mobile: original route IDs are preserved. */
#qvp-menu-toggle{display:none;align-items:center;justify-content:center;border-radius:10px;color:#e0f2ff;border:1px solid #2e587e;background:#102844;padding:0;min-width:39px;min-height:39px;cursor:pointer}
#qvp-menu-toggle svg{width:20px;height:20px}
#qvp-menu-backdrop{position:fixed;inset:0;z-index:1091;background:rgba(2,8,19,.75);backdrop-filter:blur(4px)}
#qvp-menu-drawer{position:fixed;inset:0 0 0 auto;width:min(360px,87vw);height:100dvh;z-index:1092;display:flex;flex-direction:column;background:linear-gradient(160deg,#111f37,#081424);border-left:1px solid #2e4d74;box-shadow:-20px 0 60px #0009;color:#ecf4ff}
.qvp-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:19px;border-bottom:1px solid #274263}
.qvp-drawer-head strong{font-size:16px;letter-spacing:.2px}
.qvp-drawer-close{border:1px solid #365571;background:#142e4a;color:#fff;border-radius:10px;width:36px;height:36px;font-size:21px}
.qvp-drawer-scroll{overflow:auto;flex:1;padding:12px 15px 25px;overscroll-behavior:contain}
.qvp-drawer-group{margin:0 0 13px;display:flex;flex-direction:column;gap:3px}
.qvp-drawer-group>h3{color:#92b9e2;font-size:10px;letter-spacing:1.3px;text-transform:uppercase;padding:10px 10px 5px}
.qvp-drawer-group button{display:flex;align-items:center;gap:12px;width:100%;min-height:43px;padding:10px 12px;background:transparent;color:#c6d8ed;border:1px solid transparent;border-radius:10px;font-size:13px;text-align:left}
.qvp-drawer-group button.active{background:linear-gradient(110deg,#153b67,#23244b);border-color:#3764a0;color:#fff}
.qvp-drawer-group button svg{width:18px;height:18px;flex:none}
.qvp-drawer-settings{display:flex;flex-direction:column;gap:6px;padding:15px 10px;border-top:1px solid #223a5a}
.qvp-drawer-settings label{color:#a8c6e6;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.qvp-drawer-settings select{width:135px;min-height:36px;background:#102a46;color:#fff;border:1px solid #39658c;border-radius:9px}
.qvp-drawer-settings button{display:block;width:100%;margin-top:5px;background:#173353;border:1px solid #406387;border-radius:10px;color:#e4f3ff;padding:11px;text-align:left;font-weight:650}
body.qvp-drawer-open{overflow:hidden}
@media(max-width:1020px) and (min-width:721px){:root.qvp-ready .sidebar{width:196px}:root.qvp-ready .shell{padding-left:196px}}
@media(max-width:720px){
  :root.qvp-ready .shell{padding-left:0}
  :root.qvp-ready .topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;height:66px;min-height:66px;padding:8px 14px;overflow:hidden}
  :root.qvp-ready .topbar .mobile-brand{display:flex;min-width:0;flex:1;max-width:175px;font-size:17px;letter-spacing:.4px;white-space:nowrap;overflow:hidden}
  :root.qvp-ready .topbar .mobile-brand img{width:32px;height:32px;flex-shrink:0}
  :root.qvp-ready .topbar .mobile-brand small{display:none}
  :root.qvp-ready .topbar .top-right{display:flex;align-items:center;gap:7px;flex:0 0 auto;min-width:0}
  :root.qvp-ready .topbar .top-right>#qv-v2-guide,:root.qvp-ready .topbar .top-right>#qvs-open,
  :root.qvp-ready .topbar .top-right>.badge,:root.qvp-ready .topbar .top-right>.connection,
  :root.qvp-ready .topbar .top-right>.avatar,:root.qvp-ready .topbar .exchange-picker{display:none!important}
  :root.qvp-ready #qv-language{height:38px;min-height:38px;width:76px;max-width:76px;min-width:76px;padding:0 7px;font-size:11px;border-radius:9px}
  :root.qvp-ready #qvp-menu-toggle{display:inline-flex}
  :root.qvp-ready .ws-mobile-select{display:none!important}
  :root.qvp-ready .page{padding:17px 14px calc(95px + env(safe-area-inset-bottom))!important;overflow-x:hidden}
  :root.qvp-ready .ws-masthead{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0 0 16px}
  :root.qvp-ready .ws-masthead h1{font-size:clamp(22px,6vw,27px);line-height:1.22;letter-spacing:-.45px;margin:6px 0 4px}
  :root.qvp-ready .ws-masthead .eyebrow{letter-spacing:1.1px;font-size:9px}
  :root.qvp-ready .ws-masthead>div>p:last-child{font-size:11.5px}
  :root.qvp-ready .ws-masthead>.ws-tools{display:none}
  :root.qvp-ready .qvp-page-actions{align-self:flex-end;margin:0}
  :root.qvp-ready .qvp-page-actions summary{font-size:21px;padding:0;min-width:36px;width:36px;min-height:32px;height:32px;justify-content:center;line-height:1}
  :root.qvp-ready .qvp-page-actions .ws-tools{position:absolute;right:0;top:100%;z-index:55;min-width:min(255px,calc(100vw - 44px));box-shadow:0 13px 35px #010916cf}
  :root.qvp-ready .qv-v2-control-card{padding:15px!important}
  :root.qvp-ready .qv-v2-control-card .panel-head{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
  :root.qvp-ready .ws-v2-bot-actions{flex-direction:row;flex-wrap:wrap;gap:10px}
  :root.qvp-ready .ws-v2-bot-actions .btn{flex:1 1 auto;min-width:135px;min-height:39px}
  :root.qvp-ready .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  :root.qvp-ready .stat{padding:13px;min-height:110px}
  :root.qvp-ready .stat-value{font-size:clamp(20px,5vw,26px)}
  :root.qvp-ready .stat-label{font-size:11px}
  :root.qvp-ready .stat-sub,.stat small{font-size:10px}
  :root.qvp-ready .ws-tickers{gap:9px}
  :root.qvp-ready .ws-ticker{min-height:66px;padding:10px 11px}
  :root.qvp-ready .ws-ticker b{font-size:10px}
  :root.qvp-ready .ws-ticker strong{font-size:13px}
  :root.qvp-ready .qv-v2-market{padding:13px}
  :root.qvp-ready .qv-v2-market-metrics{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  :root.qvp-ready .qv-v2-market-metrics>div{padding:11px;min-width:0}
  :root.qvp-ready .qv-v2-breadth strong{font-size:clamp(19px,5vw,25px)}
  :root.qvp-ready .qv-v2-mover{flex-wrap:wrap;line-height:1.3}
  :root.qvp-ready .ws-form{margin:13px 0;padding:14px 13px;border-radius:14px}
  :root.qvp-ready .ws-form-section{padding:4px 0 14px;margin:0 0 15px}
  :root.qvp-ready .ws-form .form-grid{grid-template-columns:minmax(0,1fr);gap:14px}
  :root.qvp-ready .qv-v2-modebar{padding:8px;gap:7px}
  :root.qvp-ready .qv-v2-mode{min-width:0;flex:1;min-height:42px;font-size:12px;padding:9px 7px;white-space:normal}
  :root.qvp-ready .qv-v2-modebar>span{font-size:10.5px;flex-basis:100%;margin:0}
  :root.qvp-ready .ws-section-title{gap:9px}
  :root.qvp-ready .ws-section-title>span{width:26px;height:26px}
  :root.qvp-ready .ws-section-title h2{font-size:15px}
  :root.qvp-ready .ws-form .field small{font-size:10px}
  :root.qvp-ready .ws-form .ws-check-grid{grid-template-columns:minmax(0,1fr)}
  :root.qvp-ready .qvs-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  :root.qvp-ready .qvs-column{gap:12px}
  :root.qvp-ready .qvs-layout .ws-chart-wrap{height:240px}
  :root.qvp-ready .qvs-layout .empty{min-height:115px}
  :root.qvp-ready .bottom-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:unset;grid-auto-columns:unset;gap:4px;padding:6px 8px calc(7px + env(safe-area-inset-bottom));background:#08192df5}
  :root.qvp-ready .bottom-nav button{min-width:0;min-height:57px;gap:4px;font-size:10px;padding:5px 1px;line-height:1.2}
  :root.qvp-ready .bottom-nav button svg{width:19px;height:19px}
  :root.qvp-ready .bottom-nav button span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  :root.qvp-ready .bottom-nav button.active{border-radius:10px}
  :root.qvp-ready .qvs-info-dialog,:root.qvp-ready .qv-v2-dialog{max-height:80dvh}
}
@media(max-width:385px){:root.qvp-ready .page{padding-left:11px!important;padding-right:11px!important}:root.qvp-ready .topbar{padding-left:10px;padding-right:10px}:root.qvp-ready .mobile-brand{font-size:15px!important}:root.qvp-ready #qv-language{min-width:69px;width:69px;max-width:69px}:root.qvp-ready .bottom-nav button{font-size:9.5px}}
@media(prefers-reduced-motion:reduce){:root.qvp-ready *{scroll-behavior:auto!important}}
@media(min-width:721px) and (max-width:900px){
  :root.qvp-ready .topbar{padding-left:11px;padding-right:11px;gap:5px}
  :root.qvp-ready .topbar .top-right{gap:5px;min-width:0}
  :root.qvp-ready #qv-v2-guide,:root.qvp-ready #qvs-open{padding:7px 8px;font-size:10px}
  :root.qvp-ready #qv-language{min-width:68px;width:68px;padding:6px 4px;font-size:10px}
  :root.qvp-ready .exchange-picker select{max-width:79px;font-size:10px}
  :root.qvp-ready .topbar .avatar{width:31px;height:31px}
}
@media(min-width:721px) and (max-width:760px){:root.qvp-ready .topbar .avatar{display:none}}
/* Avoid double information icons on the automation summary. */
:root.qvp-ready .qv-v2-control-card .panel-head>.qv-v2-control-tip{display:none!important}
