/* Dark design 2: graphite, electric lime and subtle gaming textures.
   Isolated from light theme; remove this stylesheet to restore Dark design 1. */
html[data-theme="dark"] #app{
 --panel:#111a20;--panel2:#172128;--line:#35463b;--muted:#a0afa5;--text:#f1f5ef;
 background:radial-gradient(ellipse at 85% 5%,#9bff1507,transparent 40%),#080d10;
}
html[data-theme="dark"] #app :is(.panel,.metric,.system-card,.admin-user-card){
 background:
  repeating-linear-gradient(120deg,#ffffff02 0 1px,transparent 1px 7px),
  radial-gradient(ellipse at 0 0,#a8ff3820,transparent 58%),
  linear-gradient(135deg,#1d2a26 0%,#111b20 45%,#0b1117 100%);
 border-color:#435641;border-top-color:#81ad4c;
 box-shadow:inset 0 1px 0 #d4ff9d12,inset 0 -1px 0 #48cbd509,0 8px 24px #0003;
}
html[data-theme="dark"] #app .metric{
 background:radial-gradient(ellipse at 8% 0,#b5ff3b29,transparent 65%),linear-gradient(130deg,#1f3025,#132022 58%,#0d151d);
}
html[data-theme="dark"] #app .metric:after{left:18px;right:18px;bottom:0;width:auto;height:1px;background:linear-gradient(90deg,transparent,#b4ff4266,#62d4b52b,transparent)}
html[data-theme="dark"] #app .metric-label{color:#d2ddcc}
html[data-theme="dark"] #app .metric-number{color:#f5faef;text-shadow:0 0 18px #c5ff4720}
html[data-theme="dark"] #app .metric-foot>span:last-child{color:#a9b7aa}
html[data-theme="dark"] #app .panel>.panel-heading{
 background:linear-gradient(105deg,#a5ff320a,transparent 65%);
 border-bottom-color:#a9d66b24;
}
html[data-theme="dark"] #app .bot-panel{
 background:radial-gradient(ellipse at 50% 0,#b4ff421b,transparent 42%),linear-gradient(155deg,#18271f,#101b20 55%,#0b1117);
 border-color:#608145;box-shadow:inset 0 1px 0 #e3ffbc18,0 0 24px #aaff3208,0 8px 24px #0003;
}
html[data-theme="dark"] #app .bot-assistant{
 background:linear-gradient(155deg,#101b1b,#0b1219);border-color:#52673f;
 box-shadow:inset 0 1px 0 #d5ff9a0c;
}
html[data-theme="dark"] #app .bot-assistant-heading{background:linear-gradient(110deg,#243a2370,#12201e90);border-bottom-color:#65884745}
html[data-theme="dark"] #app .assistant-bubble-bot{background:linear-gradient(135deg,#243427,#18272b);border-color:#506444;color:#fff}
html[data-theme="dark"] #app .assistant-bubble-user{background:linear-gradient(120deg,#bdff52,#91e72e);color:#080d05!important}
html[data-theme="dark"] #app #bot-assistant-form{background:#14211d;border-top-color:#52694266}
html[data-theme="dark"] #app .bot-assistant-prompts button{background:#19251f;border-color:#536746;color:#e9f4de}
html[data-theme="dark"] #app .bot-assistant-prompts button:hover:enabled{background:#253a22;border-color:#b6ff46}
html[data-theme="dark"] #app .chart-footer{border-top-color:#63824c35;color:#a6b8a8}
html[data-theme="dark"] #app .chart-grid path{stroke:#a2ca6b25}
html[data-theme="dark"] #app .sidebar{background:radial-gradient(ellipse at 50% 0,#a8ff3812,transparent 45%),linear-gradient(170deg,#131d17,#091016 75%);border-right-color:#567040}
html[data-theme="dark"] #app .sidebar-profile{background:linear-gradient(120deg,#243021,#111d20);border-color:#4b6540}
html[data-theme="dark"] #app .nav-item.active{background:linear-gradient(100deg,#a7ff3224,#18302160);border-color:#83aa43;box-shadow:inset 3px 0 0 #b6ff46,0 0 14px #a9ff320c}
html[data-theme="dark"] #app .table-scroll thead{background:#17231e}
html[data-theme="dark"] #app tbody tr:hover{background:#b6ff4607}

/* Ambient backdrop: slow glow and infrequent edge lightning, behind the UI. */
#app>.cyber-backdrop{display:none}
html[data-theme="dark"] #app>.cyber-backdrop{display:block;position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;contain:strict;background:linear-gradient(#a3ff2504 1px,transparent 1px),linear-gradient(90deg,#a3ff2504 1px,transparent 1px);background-size:90px 90px}
html[data-theme="dark"] #app>.shell{position:relative;z-index:1;background:transparent}
html[data-theme="dark"] #app .cyber-aurora{position:absolute;inset:-20%;background:radial-gradient(ellipse at 70% 25%,#aaff3519,transparent 42%),radial-gradient(ellipse at 25% 80%,#18cdb715,transparent 40%);animation:cyber-ambient-drift 24s ease-in-out infinite alternate}
html[data-theme="dark"] #app .cyber-bolt{position:absolute;top:4%;height:92%;width:150px;fill:none;stroke:#b6ff46;stroke-width:1.5;opacity:0;filter:drop-shadow(0 0 5px #aaff42);animation:cyber-edge-charge 14s ease-in-out infinite}
html[data-theme="dark"] #app .cyber-bolt-one{left:calc(16% + 4px)}
html[data-theme="dark"] #app .cyber-bolt-two{right:-25px;animation-delay:6s;stroke:#67e9b4}
html[data-theme="dark"] #app .bolt-branch{stroke-width:.7;opacity:.55}
@keyframes cyber-ambient-drift{from{transform:translate(-2%,-1%) scale(1);opacity:.55}to{transform:translate(3%,2%) scale(1.08);opacity:1}}
@keyframes cyber-edge-charge{0%,65%,100%{opacity:0;stroke-dasharray:1050;stroke-dashoffset:1050}72%{opacity:.3;stroke-dashoffset:400}80%{opacity:.4;stroke-dashoffset:0}91%{opacity:0;stroke-dashoffset:0}}
@media(max-width:760px){html[data-theme="dark"] #app .cyber-bolt{width:70px;stroke-width:1;filter:none}html[data-theme="dark"] #app .cyber-bolt-one{left:-20px}html[data-theme="dark"] #app .cyber-bolt-two{right:-25px}}
@media(prefers-reduced-motion:reduce){html[data-theme="dark"] #app .cyber-aurora{animation:none;opacity:.5}html[data-theme="dark"] #app .cyber-bolt{display:none}}

/* Exchange network: subtle connections and slow data impulses. */
#app .exchange-network{display:none}
html[data-theme="dark"] #app .cyber-bolt{display:none}
html[data-theme="dark"] #app>.cyber-backdrop{background:none}
html[data-theme="dark"] #app .exchange-network{display:block;position:absolute;inset:0;width:100%;height:100%;fill:none}
html[data-theme="dark"] #app .network-lines{stroke:#88c270;stroke-width:.7;opacity:.15}
html[data-theme="dark"] #app .network-nodes{fill:#afff50;opacity:.5}
html[data-theme="dark"] #app .network-nodes circle{transform-box:fill-box;transform-origin:center;animation:network-node-pulse 8s ease-in-out infinite}
html[data-theme="dark"] #app .network-signals{stroke:#b6ff46;stroke-width:1.4;stroke-dasharray:18 1600;opacity:.55;filter:drop-shadow(0 0 3px #a9ff42)}
html[data-theme="dark"] #app .network-signals path{animation:network-data-flow 18s linear infinite}
html[data-theme="dark"] #app .network-signals path:nth-child(2){animation-delay:-9s;stroke:#73dbb5}
@keyframes network-data-flow{from{stroke-dashoffset:1650}to{stroke-dashoffset:0}}
@keyframes network-node-pulse{0%,100%{opacity:.35;transform:scale(1)}50%{opacity:.9;transform:scale(1.35)}}
@media(max-width:760px){html[data-theme="dark"] #app .network-signals{filter:none;opacity:.35}}
@media(prefers-reduced-motion:reduce){html[data-theme="dark"] #app .network-nodes circle,html[data-theme="dark"] #app .network-signals path{animation:none}html[data-theme="dark"] #app .network-signals{display:none}}

/* Green lightning chaos: multiple directions, staggered slow strikes. */
#app .chaos-lightning{display:none}
html[data-theme="dark"] #app .exchange-network{display:none}
html[data-theme="dark"] #app .chaos-lightning{display:block;position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#b2ff47;stroke-linejoin:round;stroke-linecap:round;filter:drop-shadow(0 0 4px #9bff38) drop-shadow(0 0 13px #7cfa3060)}
html[data-theme="dark"] #app .chaos-strike{stroke-width:1.5;opacity:0;stroke-dasharray:1900;stroke-dashoffset:1900;animation:chaos-strike-draw 19s ease-out infinite}
html[data-theme="dark"] #app .chaos-branch{stroke-width:.65;opacity:.6}
html[data-theme="dark"] #app .strike-b{animation-duration:23s;animation-delay:-7s}
html[data-theme="dark"] #app .strike-c{animation-duration:17s;animation-delay:-11s;stroke:#c9ff7c}
html[data-theme="dark"] #app .strike-d{animation-duration:29s;animation-delay:-18s}
html[data-theme="dark"] #app .strike-e{animation-duration:31s;animation-delay:-23s;stroke:#86ed53}
@keyframes chaos-strike-draw{0%,68%{opacity:0;stroke-dashoffset:1900}75%{opacity:.45;stroke-dashoffset:350}80%{opacity:.55;stroke-dashoffset:0}92%,100%{opacity:0;stroke-dashoffset:0}}
@media(max-width:760px){html[data-theme="dark"] #app .chaos-lightning{filter:drop-shadow(0 0 4px #9bff38)}html[data-theme="dark"] #app .chaos-strike{stroke-width:1}}
@media(prefers-reduced-motion:reduce){html[data-theme="dark"] #app .chaos-lightning{display:none}}
/* Neutral foregrounds are pure white; semantic red/green/gray labels keep their colors. */
html[data-theme="dark"] #app{--text:#fff}
html[data-theme="dark"] #app :is(h1,h2,h3,h4,.metric-number,.metric-label,.chart-summary strong,.admin-user-card dd,.system-card strong,.exchange-logo){color:#fff}
html[data-theme="dark"] #app :is(.assistant-bubble-bot,.assistant-typing,.bot-assistant-prompts button){color:#fff}
html[data-theme="dark"] #app .bot-identity-label{color:#fff!important}
html[data-theme="dark"] #app .sidebar-profile #profile-name{color:#fff}
html[data-theme="dark"] #app .assistant-bubble-user{color:#080d05!important}
