:root{color:#edf2f7;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;--panel:#111820;--panel-strong:#17212b;--line:#283441;--muted:#94a3b8;--text:#edf2f7;--accent:#37bde2;--accent-2:#f0a83a;--danger:#f05f6b;--good:#64c783;background:#090d13;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{min-width:320px;min-height:100dvh;margin:0;overflow-x:hidden}body.client-view-body{min-height:0}button,select,input{font:inherit}button{cursor:pointer;touch-action:manipulation}.app-shell{background:linear-gradient(#37bde214,#0000 260px),#090d13;grid-template-columns:330px minmax(0,1fr);min-height:100dvh;display:grid}.app-shell.sidebar-hidden{grid-template-columns:minmax(0,1fr)}.sidebar{border-right:1px solid var(--line);background:#111820eb;flex-direction:column;gap:18px;min-width:0;padding:22px;display:flex}.brand-row{justify-content:space-between;align-items:center;gap:14px;min-width:0;display:flex}.brand{align-items:center;gap:12px;min-width:0;display:flex}.brand div{min-width:0}.brand svg{color:var(--accent);width:30px;height:30px}.brand h1,.topbar h2,.section-heading h2{letter-spacing:0;margin:0}.brand h1{text-overflow:ellipsis;white-space:nowrap;font-size:1.1rem;overflow:hidden}.brand p,.muted,.controller-meta,.eyebrow,.section-heading.inline span{color:var(--muted)}.brand p,.eyebrow{margin:2px 0 0;font-size:.82rem}.icon-button{border:1px solid var(--line);width:38px;height:38px;color:var(--text);background:var(--panel-strong);border-radius:8px;flex:none;place-items:center;display:grid}.icon-button svg{width:18px;height:18px}.status-block{border:1px solid var(--line);background:#0d131a;border-radius:8px;gap:8px;padding:12px;display:grid}.status-block div{min-width:0;color:var(--muted);align-items:center;gap:8px;font-size:.78rem;display:flex}.status-block svg{flex:none;width:15px;height:15px}.status-block span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.section-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.section-heading h2{text-transform:uppercase;color:#cbd5e1;font-size:.92rem}.section-heading button{border:1px solid var(--line);width:34px;height:34px;color:var(--text);background:var(--panel-strong);border-radius:8px;place-items:center;display:grid}.section-heading button svg{width:16px;height:16px}.section-heading button.text-action{width:auto;min-width:94px;padding:0 12px;font-size:.8rem;font-weight:800}.section-heading button:disabled{cursor:not-allowed;opacity:.5}.controller-list{gap:10px;display:grid;overflow:auto}.controller-card{border:1px solid var(--line);width:100%;color:var(--text);text-align:left;background:#0d131a;border-radius:8px;gap:8px;padding:13px;display:grid}.controller-card.active{border-color:var(--accent);background:#10202a}.controller-title{overflow-wrap:anywhere;align-items:center;gap:8px;min-width:0;font-weight:700;display:flex}.controller-title svg{width:15px;height:15px;color:var(--accent)}.controller-meta{text-overflow:ellipsis;white-space:nowrap;font-size:.82rem;overflow:hidden}.controller-flags{flex-wrap:wrap;gap:6px;display:flex}.flag{border-radius:999px;padding:3px 8px;font-size:.72rem;font-weight:700}.flag.online{color:#092113;background:var(--good)}.flag.offline{color:#f8fafc;background:#596475}.flag.default{color:#041a21;background:#6ee7f9}.flag.maintenance{color:#211602;background:var(--accent-2)}.workspace{flex-direction:column;gap:16px;min-width:0;min-height:100dvh;padding:22px;display:flex}.topbar,.controls,.electrode-panel{border:1px solid var(--line);background:#111820d6;border-radius:8px}.topbar{justify-content:space-between;align-items:center;gap:16px;padding:16px;display:flex}.topbar-main{align-items:center;gap:12px;min-width:0;display:flex}.topbar>div:first-child{min-width:0}.topbar h2{overflow-wrap:anywhere;font-size:1.4rem}.socket-pill{border:1px solid var(--line);color:#cbd5e1;border-radius:999px;justify-content:center;align-items:center;gap:8px;min-width:136px;min-height:42px;padding:9px 12px;font-weight:800;display:inline-flex}.socket-pill svg{width:17px;height:17px}.socket-pill.connected{color:var(--good);border-color:#64c78399}.socket-pill.error,.socket-pill.disconnected{color:var(--danger);border-color:#f05f6b99}.notice{overflow-wrap:anywhere;border-radius:8px;align-items:center;gap:10px;padding:10px 12px;display:flex}.notice.error{background:#f05f6b1f;border:1px solid #f05f6b80}.notice svg{flex:none;width:18px;height:18px}.controls{grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:12px;padding:14px;display:grid}.controls label{gap:6px;display:grid}.controls .checkbox-control{place-items:start}.controls .checkbox-control input{width:22px;height:22px;accent-color:var(--accent);margin:11px 0}.controls label span{text-transform:uppercase;font-size:.75rem;font-weight:800}select{border:1px solid var(--line);min-width:0;min-height:44px;color:var(--text);background:#0d131a;border-radius:8px;padding:0 10px}.plot-section{flex:360px;min-height:clamp(320px,52dvh,680px);position:relative}.mea-capture-panel{border:1px solid var(--line);background:#111820d6;border-radius:8px;padding:14px}.mea-capture-panel img{object-fit:contain;border:1px solid var(--line);background:#05080d;border-radius:8px;width:100%;max-height:min(360px,42dvh);display:block}.client-shell{color:#fff;background:linear-gradient(#03021d3d,#03021deb),#03021d url(https://finalspark.com/wp-content/uploads/2023/07/gradient-bg-1-scaled.jpg) top/cover no-repeat;min-width:320px;min-height:0;font-family:Montserrat,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.client-hero{flex-direction:column;gap:18px;width:min(1180px,100%);min-height:0;margin:0 auto;padding:clamp(20px,4vw,52px);display:flex}.client-icon-button{color:#fff;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);background:#0044bd61;border:1px solid #ffffff38;border-radius:999px;flex:none;place-items:center;width:38px;height:38px;display:grid}.client-icon-button svg{width:18px;height:18px}.client-status-row{justify-content:space-between;align-items:center;gap:10px;display:flex}.client-status,.client-meta{color:#ffffffd1;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);background:#03021d8f;border:1px solid #ffffff2e;border-radius:999px;align-items:center;gap:8px;min-height:38px;padding:8px 12px;font-weight:800;display:inline-flex}.client-status svg,.client-meta svg{flex:none;width:17px;height:17px}.client-status.connected{color:#fff;background:#eb68173d;border-color:#eb6817ad}.client-status.error,.client-status.disconnected{color:#fff;background:#70201280;border-color:#ff99008f}.client-notice{color:#fff;overflow-wrap:anywhere;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);background:#03021db8;border:1px solid #eb681775;border-radius:8px;align-items:center;gap:10px;padding:10px 12px;display:flex}.client-notice svg{flex:none;width:18px;height:18px}.client-grid{flex:auto;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:16px;min-height:0;display:grid}.client-plot-panel,.client-capture-panel,.client-electrode-panel{-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);background:#03021da3;border:1px solid #ffffff24;border-radius:8px;min-width:0;box-shadow:0 18px 54px #0000005c}.client-plot-panel{min-height:620px;position:relative;overflow:hidden}.client-plot-frame{width:100%;height:100%;min-height:inherit;background:#05050f;border-radius:8px;position:relative;overflow:hidden}.client-plot-frame.white{background:#05050f}.client-plot-frame.white .trace-labels span,.client-plot-frame.white .axis-label{color:#05050f;text-shadow:none}.client-plot-frame.white .trace-labels span{background:#ffffffe6;border-radius:999px;min-width:0;padding:2px 6px;box-shadow:0 1px 4px #00000057}.client-plot-frame.white .axis-label{background:#ffffffd1;border-radius:999px;padding:2px 6px}.client-empty-overlay{color:#ffffffc2;pointer-events:none;text-align:center;background:#03021dad;place-items:center;padding:18px;display:grid;position:absolute;inset:0}.client-capture-panel{flex-direction:column;gap:12px;padding:14px;display:flex}.client-capture-panel .section-heading h2,.client-electrode-panel .section-heading h2{color:#fff;text-transform:uppercase;font-size:clamp(1.35rem,2.6vw,2.1rem);line-height:1.15}.client-capture-panel .section-heading span,.client-electrode-panel .section-heading span{color:#ffffffad}.client-electrode-panel{padding:14px}.client-electrode-map{grid-template-columns:repeat(var(--electrode-columns), minmax(30px, 1fr));-webkit-overflow-scrolling:touch;grid-auto-rows:34px;gap:6px;padding-bottom:4px;display:grid;overflow-x:auto}.client-electrode{color:#ffffff8f;text-overflow:ellipsis;background:#ffffff0f;border:1px solid #ffffff29;border-radius:8px;place-items:center;min-width:30px;min-height:34px;font-size:.72rem;font-weight:800;line-height:1;display:grid;overflow:hidden}.client-electrode.live{color:#fff;background:#eb6817;border-color:#eb6817f5;box-shadow:0 0 18px #eb681757}.client-capture-panel img{object-fit:contain;background:#00000061;border:1px solid #ffffff24;border-radius:8px;flex:auto;width:100%;min-height:180px;max-height:320px;display:block}.capture-empty-state{color:#ffffffb8;text-align:center;background:#0000003d;border:1px dashed #ffffff38;border-radius:8px;flex:auto;place-items:center;gap:8px;min-height:180px;padding:18px;display:grid}.capture-empty-state svg{color:#eb6817;width:26px;height:26px}.plot-frame{width:100%;height:100%;min-height:inherit;border:1px solid var(--line);background:#090d13;border-radius:8px;position:relative;overflow:hidden}.plot-frame.black{background:#fff}.plot-frame.black .trace-labels span,.plot-frame.black .axis-label{color:#000;text-shadow:none}.plot-frame.white{background:#000}.plot-frame.white .trace-labels span,.plot-frame.white .axis-label{color:#fff;text-shadow:none}.trace-canvas{width:100%;height:100%;display:block}.trace-labels{pointer-events:none;position:absolute;inset:0 auto 0 12px}.trace-labels span{color:#dbeafe;text-shadow:0 1px 2px #000;min-width:42px;font-size:.75rem;font-weight:800;position:absolute;left:0;transform:translateY(-50%)}.axis-label{pointer-events:none;color:#94a3b8;text-shadow:0 1px 2px #000;text-transform:uppercase;font-size:.72rem;font-weight:800;position:absolute}.x-axis-label{bottom:10px;right:14px}.y-axis-label{top:10px;right:14px}.empty-overlay{color:var(--muted);pointer-events:none;text-align:center;place-items:center;padding:18px;display:grid;position:absolute;inset:0}.electrode-panel{padding:14px}.section-heading.inline{flex-wrap:wrap;margin-bottom:12px}.electrode-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;display:flex}.electrode-grid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:8px;display:grid}.electrode-grid.layout{grid-template-columns:repeat(var(--electrode-columns), minmax(38px, 1fr));-webkit-overflow-scrolling:touch;grid-auto-rows:42px;justify-content:start;padding-bottom:4px;overflow-x:auto}.electrode-grid button{border:1px solid var(--line);min-height:44px;color:var(--text);background:#0d131a;border-radius:8px;font-weight:800}.electrode-grid.layout button{place-items:center;gap:0;width:100%;height:42px;min-height:42px;line-height:1;display:grid}.electrode-grid.layout button span,.electrode-grid.layout button small{text-overflow:ellipsis;max-width:100%;overflow:hidden}.electrode-grid.layout button small{color:var(--muted);font-size:.62rem;font-weight:700}.electrode-grid button.selected{border-color:var(--accent);color:#e6fbff;background:#12303c}.electrode-grid button:disabled,select:disabled{cursor:not-allowed;opacity:.5}@media (width<=900px){.app-shell,.client-grid{grid-template-columns:1fr}.client-plot-panel{min-height:560px}.sidebar{border-right:0;border-bottom:1px solid var(--line);gap:14px}.controller-list{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;grid-template-columns:none;grid-auto-columns:minmax(220px,72vw);grid-auto-flow:column;padding-bottom:4px;overflow-x:auto}.controller-card{scroll-snap-align:start}.controls{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=560px){.client-hero{padding:12px}.client-status,.client-meta{flex:auto}.client-plot-panel{min-height:460px}.client-capture-panel img,.capture-empty-state{min-height:190px}.client-electrode-map{grid-template-columns:repeat(var(--electrode-columns), minmax(28px, 1fr));grid-auto-rows:32px}.sidebar,.workspace{padding:12px}.topbar{flex-direction:column;align-items:flex-start;gap:12px;padding:14px}.topbar h2{font-size:1.18rem}.socket-pill{align-self:stretch;width:100%}.controls{grid-template-columns:1fr;padding:12px}.controls .checkbox-control{align-items:center}.plot-section{flex:none;min-height:58dvh}.trace-labels{inset:0 auto 0 8px}.trace-labels span,.axis-label{font-size:.66rem}.x-axis-label{bottom:8px;right:10px}.y-axis-label{top:8px;right:10px}.electrode-panel{padding:12px}.electrode-actions{justify-content:space-between;width:100%}.section-heading button.text-action{min-width:112px;min-height:38px}.electrode-grid{grid-template-columns:repeat(auto-fill,minmax(52px,1fr))}.electrode-grid.layout{grid-template-columns:repeat(var(--electrode-columns), minmax(42px, 1fr))}}
