/* Quiet Data Agent Panel: dark mode (v331). Applies ONLY on the Dashboard look (html.as-on) while html[data-qdtheme="dark"] is set by the toggle.
   Classic look, the main app and every other page are untouched. */

/* the light "white glass" palette is re-pointed to a dark one; the rules below then restyle each light surface */
html.as-on[data-qdtheme="dark"]{background:#0a111f;color-scheme:dark}
html.as-on[data-qdtheme="dark"] #v-agent,html.as-on[data-qdtheme="dark"] #asSide{--surface:#121b2e;--surface2:#18233a;--line:rgba(148,163,205,.16);--line2:rgba(148,163,205,.26);--text:#e8edf8;--muted:#8f9cb8;--muted2:#6f7c99;--input:#0e1627;--accent-text:#7fb0ff;--glow:rgba(26,92,255,.3);--sh:rgba(0,0,0,.5);--st-sh:rgba(0,0,0,.5);color:#e8edf8}

/* the switch itself: sits at the right end of the Agent Panel top bar (Dashboard look only; the Classic look is already dark) */
.qd-tg{flex:none;display:inline-grid;place-items:center;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.qd-tg svg{width:18px;height:18px;display:block}
.qd-tg .qd-sun{display:none}
html[data-qdtheme="dark"] .qd-tg .qd-sun{display:block}
html[data-qdtheme="dark"] .qd-tg .qd-moon{display:none}
html:not(.as-on) .agd-bar .qd-tg{display:none}
html.as-on .agd-bar .qd-tg{order:3;width:38px;height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.95);background:#fff;color:#1a2b55;box-shadow:0 3px 10px rgba(40,60,130,.08)}
html.as-on .agd-bar .qd-tg:focus-visible{outline:2px solid #1a5cff;outline-offset:2px}
html.as-on[data-qdtheme="dark"] .agd-bar .qd-tg{background:#18233a;border-color:rgba(148,163,205,.26);color:#f5c56b;box-shadow:none}

html.as-on[data-qdtheme="dark"]:not(#qd){background:#1c2738}
html.as-on[data-qdtheme="dark"]:not(#qd) body{background:radial-gradient(900px 520px at 8% -8%,#15223f,transparent 60%),radial-gradient(800px 480px at 98% 2%,#152e3f,transparent 58%),linear-gradient(180deg,#15203f,#1c2738 80%)!important;color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) #v-agent,html.as-on[data-qdtheme="dark"]:not(#qd) #asSide{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-bar{background:rgba(21,36,63,0.78);border-bottom:1px solid rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-bar b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-bar .agd-back{background:linear-gradient(150deg,#151d30,rgba(26,36,61,0.78));border:1px solid rgba(148,163,205,0.2);color:#c3c7d0}
html.as-on[data-qdtheme="dark"]:not(#qd) #asMenu{background:linear-gradient(150deg,#151d30,rgba(26,36,61,0.78));border:1px solid rgba(148,163,205,0.2);color:#cbcfd8}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-bd.show{box-shadow:0 0 0 2px rgba(255,255,255,0.05)}
html.as-on[data-qdtheme="dark"]:not(#qd) #asSide{background:linear-gradient(170deg,rgba(26,36,61,0.94),rgba(21,35,63,0.86));border-right:1px solid rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-brand{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-r{color:#b1b5bf}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-r i{color:#b1b5bf}
@media (hover:hover){
html.as-on[data-qdtheme="dark"]:not(#qd) .as-r:hover{color:#d5d8e0}
}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-b.show.live{color:#66ebb7}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-seg button{color:#b1b5bf}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-seg button.on{background:#151d30}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-me{border-top:1px solid rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-me b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) #asBack{border:1px solid rgba(148,163,205,0.2);background:rgba(26,36,61,0.9);color:#cbcfd8}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-card,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-stat{border:1px solid rgba(148,163,205,0.2);background:linear-gradient(160deg,rgba(26,36,61,0.95),rgba(26,36,61,0.74));box-shadow:0 1px 0 rgba(255,255,255,0.05) inset,0 10px 30px rgba(40,60,130,.08),0 0 0 1px rgba(30,50,110,.05);color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-card-head h3,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-card h2,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-card h3,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-stat-l{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-num{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-tile.green{color:#66ebb7}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-tile.amber{color:#fbc574}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-btn.ghost{background:rgba(26,36,61,0.85);color:#cbcfd8;border:1px solid rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-field input,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-field textarea,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-pin input,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-customer-search input,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-link input{background:#1b263a;border-color:rgba(148,163,205,0.2);color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-msgbar,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-top{background:linear-gradient(135deg,rgba(26,36,61,0.95),rgba(21,38,63,0.85));color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-ord{border-color:rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-seg{border-color:rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-seg button{color:#b1b5bf}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-seg button.on{background:#151d30}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-chip{border-color:rgba(148,163,205,0.2);color:#cbcfd8}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-flash{background:#1e362b;border-color:rgba(148,163,205,0.2);color:#6ae6b9}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-ch-v b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-chg.up{color:#66ebb7}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-pill button{color:#b1b5bf}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-pill button.on{background:#151d30}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-dn{fill:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-don li{color:#b1b5bf}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-don li b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-bar{color:#b1b5bf}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-bar b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-top li{border-bottom:1px solid rgba(148,163,205,0.2);color:#c3c7d0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-top li b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-e3 div{border:1px solid rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-e3 b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .qd-memfoot{border:1px solid rgba(148,163,205,0.2);background:#151d30;color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .qd-memfoot .gx-bt b{color:#d5d8e0}
html.as-on[data-qdtheme="dark"]:not(#qd) .qd-memfoot .gx-bt small{color:#fbc465}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget>div{background:linear-gradient(180deg,#1a3a2b,#224434)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget small{color:#68e9bb}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget b{color:#64edac}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget>div:last-child b{color:#60f1ad}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget.bad>div{background:linear-gradient(180deg,#3f1518,#3f1519)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget.bad small,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget.bad b,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-vget.bad>div:last-child b{color:#ee7f89}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-pprofit{color:#60f1ad}
html.as-on[data-qdtheme="dark"]:not(#qd) .as-me img{background:#151d30;border:1px solid rgba(148,163,205,0.2)}
html.as-on[data-qdtheme="dark"]:not(#qd){background:#1c2738}
html.as-on[data-qdtheme="dark"]:not(#qd) body{background-color:#1c2738!important}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-card,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-stat{background:linear-gradient(160deg,#151d30,#111d33)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-bar{background:#15243f}
html.as-on[data-qdtheme="dark"]:not(#qd) #asSide{background:#111b33}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-msgbar,html.as-on[data-qdtheme="dark"]:not(#qd) .agd-top{background:linear-gradient(135deg,#151d30,#15263f)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-btn.ghost{background:#151d30}

html.as-on[data-qdtheme="dark"],html.as-pre[data-qdtheme="dark"]{background:#0a111f}
html.as-pre[data-qdtheme="dark"] body{background:#0a111f!important}
html.as-on[data-qdtheme="dark"] body{background-color:#0a111f!important;background-image:radial-gradient(900px 520px at 8% -8%,rgba(26,92,255,.14),transparent 60%),radial-gradient(800px 480px at 98% 2%,rgba(52,195,180,.07),transparent 58%)!important;color:#e8edf8}

/* selected segment / pill: a lighter chip on a slightly lifted track so the chosen option is obvious */
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-seg,html.as-on[data-qdtheme="dark"]:not(#qd) .as-seg,html.as-on[data-qdtheme="dark"]:not(#qd) .as-pill{background:rgba(148,163,205,.10);border-color:rgba(148,163,205,.18)}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-seg button.on,html.as-on[data-qdtheme="dark"]:not(#qd) .as-seg button.on,html.as-on[data-qdtheme="dark"]:not(#qd) .as-pill button.on{background:#27385a;color:#9cc3ff;box-shadow:none}
html.as-on[data-qdtheme="dark"]:not(#qd) .agd-seg button,html.as-on[data-qdtheme="dark"]:not(#qd) .as-seg button,html.as-on[data-qdtheme="dark"]:not(#qd) .as-pill button{color:#a9b6d3}

