/* AutoLab SCADA · Moon-palette design system
   Reference swatches: #F5D5E0 · #6667AB · #7B337E · #420D4B · #210635 */
:root{
  font-family:"DM Sans",Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color-scheme:light;
  --bg:#F9F3F8;--surface:#FFFCFF;--surface-soft:#F5E9F2;--surface-quiet:#FCF6FB;
  --ink:#2A1636;--heading:#210635;--muted:#6E5976;--faint:#92819A;
  --line:#EADBEA;--line-bold:#DBC4E0;
  --teal:#420D4B;--teal-strong:#7B337E;--teal-pale:#F4DFEF;
  --gold:#C18FC2;--ocean:#6667AB;--error:#AD386E;
  --graph-grid:#EBDFED;--shadow:0 18px 48px rgba(66,13,75,.065);
  --round:19px;--focus:#6667AB;--card-highlight:rgba(245,213,224,.34);
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#17051E;--surface:#250B31;--surface-soft:#30113E;--surface-quiet:#2A0D36;
  --ink:#F4E5F1;--heading:#FFF2FB;--muted:#D0B6D4;--faint:#A88CAA;
  --line:#48234F;--line-bold:#65366A;
  --teal:#D6A8D7;--teal-strong:#E5B8E2;--teal-pale:#4B2356;
  --gold:#F5D5E0;--ocean:#A6A7EA;--error:#FEB0CC;
  --graph-grid:#492550;--shadow:0 20px 58px rgba(7,0,12,.30);
  --focus:#A6A7EA;--card-highlight:rgba(123,51,126,.20);
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);min-height:100vh}body,button,input,select{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.47}a{text-decoration:none;color:inherit}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #6667AB;outline-offset:3px}svg{flex-shrink:0}h1,h2,h3,p{margin-top:0}h1,h2,h3{color:var(--heading);letter-spacing:-.047em}p{line-height:1.65}strong{font-weight:740}
.entry-frame{min-height:100vh;max-width:1450px;margin:auto;padding:0 56px;display:flex;flex-direction:column}.shell{display:flex;min-height:100vh}.welcome-view .shell{display:none}.workspace-view .entry-frame{display:none}.entry-header{min-height:86px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.entry-header-actions{display:flex;align-items:center;gap:23px}.entry-header-tag{font-size:10px;color:var(--muted);letter-spacing:2px;font-weight:760}.brand{display:flex;gap:10px;align-items:center;min-width:0}.brand-icon{flex:none;width:41px;height:41px;display:grid;place-items:center;border-radius:13px;background:#420D4B;color:#F5D5E0}.brand-icon svg{width:27px;height:27px}.brand strong{display:block;font-size:23px;font-weight:850;color:var(--heading);letter-spacing:-.075em;line-height:1}.brand-dot{color:var(--teal)}.brand small{font-size:10px;letter-spacing:3.5px;color:var(--muted);display:block;font-weight:800;margin-top:6px}.entry-content{flex:1}.entry-hero{min-height:365px;display:grid;grid-template-columns:1.08fr .92fr;gap:50px;align-items:center;padding:25px 0 15px}.eyebrow{color:var(--teal-strong);font-size:10px;letter-spacing:2px;font-weight:850;text-transform:uppercase}.entry-copy h1{font-weight:820;font-size:clamp(44px,4.6vw,67px);letter-spacing:-.075em;line-height:1.08;margin:19px 0 15px;max-width:700px}.entry-copy h1 em{font-style:normal;color:var(--teal-strong)}.entry-copy p{font-size:15px;line-height:1.72;color:var(--muted);max-width:540px;margin:0}.hero-micro{display:flex;flex-wrap:wrap;gap:20px;margin-top:23px}.hero-micro span{display:flex;align-items:center;gap:7px;color:var(--ink);font-size:11px;font-weight:700}.hero-micro svg{color:var(--teal-strong)}
.hero-instrument{background:#420D4B;color:#F5D5E0;border-radius:24px;min-width:0;transform:rotate(-1deg);box-shadow:0 32px 65px rgba(18,67,59,.14);border:1px solid #7B337E;overflow:hidden}.instrument-head{display:flex;align-items:center;justify-content:space-between;padding:14px 22px;border-bottom:1px solid #ffffff1c;font-size:9px;letter-spacing:1.8px;font-weight:800;color:#DDB4D8}.instrument-head>span:first-child{display:flex;gap:5px}.instrument-head i{display:block;width:6px;height:6px;background:#A29DE0;border-radius:50%}.instrument-head i:nth-child(2){background:#F5D5E0}.instrument-head i:nth-child(3){background:#6667AB}.instrument-body{padding:17px 22px 7px}.instrument-reading{display:flex;flex-direction:column}.instrument-reading small{font-size:10px;letter-spacing:1.4px;color:#D6B3D4;font-weight:850}.instrument-reading strong{font-size:55px;letter-spacing:-.07em;line-height:1.4;color:#FFF1FA}.instrument-reading strong span{font-size:23px;font-weight:500;color:#E2CAD8}.instrument-live{color:#F5D5E0;font-size:9px;font-weight:800;letter-spacing:1.4px}.instrument-body>svg{display:block;width:100%;height:106px;margin-top:0}.instrument-footer{display:flex;justify-content:space-between;padding:12px 0;border-top:1px solid #ffffff1a;font-size:9px;color:#E2CAD8;letter-spacing:1.1px}
.entry-paths{padding:10px 0 22px}.paths-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:13px}.paths-head h2{font-size:30px;font-weight:790;margin:10px 0 0}.paths-head p{font-size:12px;color:var(--muted);margin:0 0 5px}.entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.entry-card{background:var(--surface);padding:21px 25px 21px;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);position:relative;overflow:hidden;display:flex;flex-direction:column;min-height:262px}.entry-card:after{content:"";height:4px;position:absolute;top:0;left:0;right:0;background:var(--teal-strong);opacity:0;transition:opacity .2s}.entry-card:hover:after{opacity:1}.live-entry:after{background:var(--gold)}.path-index{font-size:10px;color:var(--muted);font-weight:800;letter-spacing:1.6px}.path-icon{width:47px;height:47px;margin-top:12px;margin-bottom:10px;background:var(--teal-pale);color:var(--teal-strong);border-radius:14px;display:grid;place-items:center}.live-entry .path-icon{color:#420D4B;background:#F5D5E0}html[data-theme=dark] .live-entry .path-icon{background:#420D4B;color:#E2CAD8}.entry-card h3{font-size:22px;margin:0 0 8px;letter-spacing:-.04em}.entry-card>p{font-size:12px;color:var(--muted);max-width:450px;line-height:1.65;margin-bottom:11px}.path-bottom{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:15px}.path-bottom>span{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:var(--muted)}.access-form{margin-top:auto}.access-form label{display:block;font-size:10px;font-weight:850;letter-spacing:1.5px;color:var(--muted);margin-bottom:9px}.access-line{display:flex;gap:9px}.access-line input{flex:1;min-width:0;border-radius:11px;padding:13px 13px;font-size:14px;letter-spacing:3px;border:1px solid var(--line-bold);background:var(--surface-quiet);color:var(--ink)}.access-note{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);margin-top:14px}.access-note .status-lamp{background:#A88CAA}.access-note.ready .status-lamp{background:#7B337E}.small-route-link{padding:0;background:none;border:0;text-align:left;color:var(--teal-strong);display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;margin-top:10px}.entry-footnote{color:var(--muted);font-size:11px;display:flex;gap:8px;align-items:center;justify-content:center;margin:2px auto 40px}.entry-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:20px 0 27px;font-size:11px;color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:transparent;border:1px solid var(--line-bold);border-radius:11px;min-height:43px;padding:11px 17px;color:var(--ink);font-size:12px;font-weight:760;white-space:nowrap;transition:transform .15s,background .15s,border-color .15s}.btn:hover:not(:disabled){transform:translateY(-1px);border-color:var(--teal-strong)}.btn.primary{background:var(--teal-strong);color:#FFF;border-color:var(--teal-strong)}html[data-theme=dark] .btn.primary{color:#210635}.btn.primary:hover:not(:disabled){background:var(--teal)}.btn.secondary{background:var(--surface);border-color:var(--line-bold)}.btn.text-btn,.text-btn{border:0;color:var(--teal-strong);padding:5px 0;min-height:auto;background:none}.btn.stop-btn{background:#FBEAF1;border-color:#E5BED5;color:#90345D}html[data-theme=dark] .btn.stop-btn{background:#4F2048;border-color:#9F577E;color:#F7BDD9}.btn.quiet-danger,.btn.text-danger{color:var(--error);background:none;border-color:transparent}.btn.light-outline{background:#ffffff12;color:#FFF4FA;border-color:#ffffff4d}.icon-button{width:40px;height:40px;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;border-radius:11px;color:var(--ink)}.icon-button:hover{background:var(--surface-soft)}.status-lamp{display:inline-block;width:8px;height:8px;background:var(--teal-strong);border-radius:50%;box-shadow:0 0 0 4px #7B337E22;flex:none}
.sidebar{width:242px;flex:none;position:sticky;top:0;height:100vh;border-right:1px solid var(--line);background:var(--surface);padding:32px 18px 24px;display:flex;flex-direction:column}.sidebar .brand{margin:0 0 65px 11px}.sidebar .brand-icon{width:37px;height:37px}.sidebar .brand strong{font-size:22px}.nav-label{font-size:10px;letter-spacing:1.8px;font-weight:800;color:var(--faint);margin:0 0 15px 12px}.nav-links{display:flex;flex-direction:column;gap:7px}.nav-link{border-radius:12px;min-height:46px;display:flex;align-items:center;gap:14px;padding:0 14px;color:var(--muted);font-size:12px;font-weight:725;transition:background .15s,color .15s}.nav-link:hover{background:var(--surface-soft);color:var(--ink)}.nav-link.selected{background:var(--teal-pale);color:var(--teal-strong)}.nav-link svg{width:19px}.sidebar-spacer{flex:1}.sidebar-info{background:var(--surface-quiet);border:1px solid var(--line);display:flex;align-items:flex-start;gap:10px;border-radius:13px;padding:15px 12px;font-size:11px;color:var(--muted);line-height:1.5}.sidebar-info.online .status-lamp{background:#7B337E}.sidebar-info.warning .status-lamp{background:var(--gold)}.sidebar-footer{padding:19px 6px 0;display:flex;flex-direction:column;gap:20px;color:var(--faint);font-size:10px}.leave-link{display:inline-flex;align-items:center;gap:9px;background:transparent;border:0;color:var(--muted);font-size:11px;font-weight:760;padding:7px 0;text-align:left}.leave-link:hover{color:var(--teal-strong)}.leave-link svg{width:17px}.main-column{min-width:0;flex:1;display:flex;flex-direction:column}.topbar{height:78px;flex:none;border-bottom:1px solid var(--line);background:var(--surface);padding:0 40px;display:flex;align-items:center;justify-content:space-between}.top-actions,.top-left{display:flex;align-items:center;gap:15px}.crumb{font-size:12px;color:var(--muted)}.crumb span{font-size:10px;letter-spacing:1.2px}.crumb strong{color:var(--ink);margin-left:8px}.system-pill{display:inline-flex;align-items:center;gap:9px;background:var(--surface-soft);border:1px solid var(--line);border-radius:999px;padding:9px 12px;font-size:10px;letter-spacing:.7px;font-weight:800;color:var(--muted)}.system-pill.online{background:var(--teal-pale);color:var(--teal-strong);border-color:transparent}.system-pill.warning .status-lamp{background:var(--gold)}.mobile-brand{display:none}.page{max-width:1550px;width:100%;padding:39px 42px 70px;margin:0 auto;flex:1}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:27px}.page-header h1{font-size:clamp(28px,3vw,39px);margin:8px 0 7px;line-height:1.2;font-weight:820}.subheading{font-size:12px;color:var(--muted);margin:0}.header-action{display:flex;align-items:center;gap:8px}.footer{padding:20px 42px 24px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;color:var(--muted);font-size:10px}.mobile-nav{display:none}
.overview-strip{background:#420D4B;color:#F5D5E0;border-radius:var(--round);display:flex;align-items:center;justify-content:space-between;gap:25px;padding:27px 32px;margin-bottom:32px;position:relative;overflow:hidden}.overview-strip:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;border:1px solid #ffffff26;right:16%;top:-95px;box-shadow:0 0 0 32px #ffffff08,0 0 0 72px #ffffff05;pointer-events:none}.overview-strip .eyebrow{color:#E2BEDC}.overview-strip h2{font-size:22px;margin:7px 0 5px;letter-spacing:-.035em;color:#FFF4FA}.overview-strip p{font-size:12px;color:#F5D5E0;max-width:560px;margin:0}.strip-side{display:flex;flex-direction:column;align-items:flex-end;gap:16px;position:relative;z-index:1}.strip-indicator{font-size:10px;letter-spacing:1.2px;display:flex;align-items:center;gap:8px;color:#F5D5E0;font-weight:800;white-space:nowrap}.strip-indicator .status-lamp{background:#E2CAD8}.section-heading{margin:0 0 15px;display:flex;align-items:end;justify-content:space-between}.section-heading h2{font-size:17px;margin:0 0 4px}.section-heading p{color:var(--muted);font-size:11px;margin:0}.data-source{font-size:10px;display:flex;align-items:center;gap:7px;color:var(--muted);font-weight:700;letter-spacing:.5px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--round);box-shadow:var(--shadow);min-width:0}.sensor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:22px}.metric{min-height:174px;padding:24px 25px;position:relative;overflow:hidden}.metric-top{display:flex;justify-content:space-between;align-items:center;gap:15px;color:var(--muted);font-size:12px;font-weight:700}.metric-icon{color:var(--teal-strong)}.metric-number{margin-top:12px;font-size:clamp(30px,3vw,40px);letter-spacing:-.065em;font-weight:780;font-variant-numeric:tabular-nums}.metric-bottom{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted);margin-top:10px}.tiny-circle{width:6px;height:6px;border-radius:50%;background:var(--teal-strong)}.metric-alias{margin-left:auto;color:var(--faint);font-size:10px}.metric-spark{position:absolute;width:122px;height:46px;right:19px;bottom:18px;opacity:.73}.metric-spark svg{width:100%;height:100%}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:20px;margin-bottom:21px}.dashboard-bottom{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(305px,.75fr);gap:20px}.control-card,.run-card,.activity-card,.chart-card{padding:25px 27px}.panel-top{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:23px}.panel-top h2{font-size:17px;margin:0 0 6px}.panel-top p{font-size:11px;color:var(--muted);margin:0}.mini-pill{padding:6px 9px;color:var(--muted);background:var(--surface-soft);border-radius:7px;font-size:9px;white-space:nowrap;letter-spacing:.8px;font-weight:800}.mini-pill.live{color:var(--teal-strong);background:var(--teal-pale)}.mini-pill.locked{color:var(--error)}.output-list{display:flex;flex-direction:column}.output-tile{border-top:1px solid var(--line);min-height:87px;display:flex;align-items:center;justify-content:space-between;gap:12px}.output-left,.output-right{display:flex;align-items:center;gap:13px}.output-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--surface-soft);color:var(--teal-strong)}.output-left strong{font-size:12px;display:block}.output-left small{font-size:10px;color:var(--muted);display:block;margin-top:5px}.output-state{font-size:10px;letter-spacing:1px;color:var(--faint);font-weight:800}.output-state.active{color:var(--teal-strong)}.switch{background:var(--line-bold);height:27px;width:50px;border:0;border-radius:50px;padding:4px;position:relative}.switch:before{content:"";display:block;width:19px;height:19px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .19s}.switch.on{background:var(--teal-strong)}.switch.on:before{transform:translateX(23px)}.control-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:19px;flex-wrap:wrap}.control-footer span{font-size:10px;color:var(--muted)}.pair-callout{border:1px solid var(--line);background:var(--surface-soft);padding:14px;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:13px}.pair-callout strong{font-size:12px}.pair-callout p{font-size:11px;color:var(--muted);margin:4px 0 0}.empty-small{padding:17px 0 6px;display:flex;flex-direction:column;align-items:flex-start}.empty-icon{width:42px;height:42px;display:grid;place-items:center;color:var(--teal-strong);background:var(--teal-pale);border-radius:12px;margin-bottom:17px}.empty-small strong{font-size:14px}.empty-small p{font-size:11px;color:var(--muted);max-width:275px;margin:7px 0 17px}.active-run{padding-top:10px}.run-summary{display:flex;justify-content:space-between;align-items:center;gap:15px}.run-summary strong{font-size:14px}.run-summary small{font-size:11px;color:var(--muted)}.run-step-title{font-size:12px;color:var(--muted);margin-top:19px}.progress{height:9px;background:var(--surface-soft);border-radius:8px;overflow:hidden;margin-top:14px}.progress>div{height:100%;background:var(--teal-strong);border-radius:8px}.progress-notes{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;margin-top:9px}.run-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:21px}.legend{display:flex;gap:20px;font-size:10px;font-weight:700;color:var(--muted);margin-top:5px}.legend span{display:flex;align-items:center;gap:8px}.legend-dot{height:8px;width:8px;border-radius:50%;background:var(--teal-strong)}.legend-dot.blue{background:var(--ocean)}.graph{margin:10px 0 0;overflow:hidden}.chart-outer{width:100%}.chart-svg{display:block;width:100%;height:auto}.empty-chart{padding:80px 0;text-align:center;color:var(--muted);font-size:12px}.graph-note{font-size:10px;color:var(--faint);margin-top:10px}.chart-download{background:none;border:0;color:var(--teal-strong);font-size:11px;font-weight:740;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.activity-list{display:flex;flex-direction:column}.activity-item{display:flex;align-items:flex-start;gap:12px;border-top:1px solid var(--line);padding:14px 0}.activity-item:first-child{border-top:0}.event-marker{width:7px;height:7px;border-radius:50%;background:var(--teal-strong);margin-top:5px;flex:none}.event-marker.danger{background:var(--error)}.activity-item>div{min-width:0;flex:1}.activity-item strong{font-size:11px;display:block}.activity-item small{font-size:10px;line-height:1.5;color:var(--muted);display:block;overflow-wrap:anywhere;margin-top:4px}.activity-item time{font-size:10px;color:var(--faint)}.empty-activity{font-size:11px;color:var(--muted)}.help-row,.connection-alert{display:flex;align-items:center;gap:9px;font-size:11px;line-height:1.5;color:var(--muted);margin-top:22px}.help-row svg{color:var(--teal-strong)}.connection-alert{background:#FBEAF1;color:#90345D;border:1px solid #E5BED5;padding:14px 17px;border-radius:12px;margin:0 0 23px}html[data-theme=dark] .connection-alert{background:#4F2048;border-color:#875478;color:#F7BDD9}
.recipe-layout{display:grid;grid-template-columns:minmax(250px,.75fr) minmax(0,1.45fr);gap:21px}.recipe-library,.recipe-editor{padding:26px}.count-chip{display:grid;place-items:center;min-width:25px;height:25px;padding:0 6px;border-radius:8px;background:var(--surface-soft);color:var(--muted);font-size:12px;font-weight:750}.recipe-choices{display:flex;flex-direction:column;gap:10px}.recipe-choice{display:block;text-align:left;width:100%;padding:17px;border:1px solid var(--line);border-radius:13px;background:var(--surface-quiet);color:var(--ink)}.recipe-choice:hover{border-color:var(--teal-strong)}.recipe-choice.chosen{background:var(--teal-pale);border-color:var(--teal-strong)}.choice-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.choice-top strong{font-size:12px}.recipe-choice p{font-size:11px;color:var(--muted);margin:8px 0}.recipe-choice small{font-size:10px;color:var(--muted)}.recipe-choice small span{margin:0 5px}.recipe-editor>.field{margin-bottom:17px}.field label,.step-inputs label:not(.checkbox-label){display:block;font-size:11px;color:var(--ink);font-weight:750;margin-bottom:8px}.field label span{color:var(--muted);font-weight:400}.field input,.step-inputs input:not([type=checkbox]){width:100%;background:var(--surface-quiet);border:1px solid var(--line-bold);color:var(--ink);border-radius:10px;font-size:12px;min-height:42px;padding:10px 12px;outline-offset:2px}.editor-row{display:grid;grid-template-columns:1fr 150px;gap:13px;margin-bottom:22px}.editor-section-head{border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:22px;margin-bottom:11px}.editor-section-head h3{font-size:14px;margin:0 0 4px}.editor-section-head p{font-size:10px;color:var(--muted);margin:0}.step-cards{display:flex;flex-direction:column;gap:10px}.step-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--surface-quiet)}.step-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.step-card-head strong{display:flex;align-items:center;gap:8px;font-size:11px}.step-number{display:grid;place-items:center;width:25px;height:25px;background:var(--teal-pale);color:var(--teal-strong);border-radius:8px}.plain-icon{background:transparent;border:0;color:var(--muted);padding:5px;display:grid;place-items:center}.step-inputs{display:grid;grid-template-columns:minmax(110px,1fr) 100px auto auto;align-items:end;gap:11px}.checkbox-label{display:flex;align-items:center;gap:6px;height:42px;font-size:11px;color:var(--ink);font-weight:700}.checkbox-label input{accent-color:var(--teal-strong)}.recipe-summary{display:flex;align-items:center;justify-content:space-between;margin-top:22px;padding:15px;background:var(--surface-soft);border-radius:11px;font-size:11px;color:var(--muted)}.recipe-summary span{display:flex;align-items:center;gap:8px}.recipe-summary strong{font-size:17px;color:var(--ink)}.editor-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.field-footnote{font-size:10px;color:var(--muted);margin:17px 0 0}.history-card{padding:27px}.table-scroller{width:100%;overflow-x:auto}.records{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left}.records th{text-transform:uppercase;font-size:10px;letter-spacing:1.2px;color:var(--faint);font-weight:850;border-bottom:1px solid var(--line-bold);padding:13px 10px}.records td{border-bottom:1px solid var(--line);padding:17px 10px;font-size:11px;color:var(--muted)}.records td strong{color:var(--ink)}.table-status{font-weight:800;font-size:10px;color:var(--muted)}.table-status.ok{color:var(--teal-strong)}.table-status.fault{color:var(--error)}.text-action{background:none;border:0;color:var(--teal-strong);font-size:11px;font-weight:730}.history-empty{text-align:center;padding:65px 20px;color:var(--muted)}.history-empty svg{color:var(--teal-strong)}.history-empty h3{font-size:16px;margin:10px 0 5px}.history-empty p{font-size:11px;margin-bottom:18px}.history-helper{display:flex;align-items:center;gap:10px;margin-top:20px;color:var(--muted)}.history-helper p{font-size:11px;margin:0}
.toasts{z-index:60;position:fixed;bottom:23px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:9px;pointer-events:none}.toast{pointer-events:auto;padding:13px 17px;background:var(--surface);border:1px solid var(--line-bold);box-shadow:0 13px 35px #0002;border-radius:11px;color:var(--ink);font-size:12px;max-width:400px}.toast.error{border-color:var(--error);color:var(--error)}.toast.success{border-color:var(--teal-strong)}.modal{border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);width:min(540px,calc(100vw - 32px));padding:29px;box-shadow:0 40px 100px #0006;max-height:85vh;overflow-y:auto}.modal::backdrop{background:#071619ac;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-badge{display:flex;align-items:center;gap:6px;color:var(--teal-strong);font-size:10px;letter-spacing:1px;font-weight:820}.modal h2{font-size:26px;margin:21px 0 8px}.modal h3{font-size:15px;margin:20px 0 13px}.dialog-desc{font-size:12px;color:var(--muted)}.dialog-note{font-size:10px;color:var(--muted);margin:19px 0 0}.modal form{margin-top:23px}.modal form .btn{margin-top:15px}.modal form .full{width:100%}.detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}.detail-stats div{padding:14px;background:var(--surface-soft);border-radius:10px}.detail-stats small{display:block;color:var(--muted);font-size:10px}.detail-stats strong{display:block;font-size:19px;margin-top:7px}.detail-steps>div{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 0;font-size:11px}.detail-steps strong small{font-weight:400;color:var(--muted)}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
@media(max-width:1220px){.entry-frame{padding:0 34px}.entry-hero{gap:32px}.sidebar{width:216px}.topbar{padding:0 26px}.page{padding:34px 25px}.footer{padding-left:25px;padding-right:25px}.dashboard-grid{grid-template-columns:1fr 1fr}.dashboard-bottom{grid-template-columns:1fr .82fr}.control-card,.run-card,.activity-card,.chart-card{padding:22px}}
@media(max-width:1000px){.entry-hero{gap:22px;min-height:auto;padding:55px 0 35px}.entry-copy h1{font-size:clamp(40px,5.8vw,60px)}.dashboard-grid,.dashboard-bottom{grid-template-columns:1fr}.recipe-layout{grid-template-columns:1fr}.recipe-choices{display:grid;grid-template-columns:repeat(2,1fr)}.sidebar{width:200px}.hero-micro{gap:13px}}
@media(max-width:790px){.entry-header{min-height:82px}.entry-header-tag{display:none}.entry-frame{padding:0 23px}.entry-hero{grid-template-columns:1fr;gap:27px;padding:43px 0 27px}.entry-copy h1{font-size:clamp(44px,8vw,66px);max-width:580px}.entry-copy p{max-width:650px}.hero-instrument{max-width:570px;width:100%;transform:none}.entry-grid{grid-template-columns:1fr}.entry-card{min-height:auto}.entry-card>p{max-width:600px}.entry-card .access-form{margin-top:12px}.entry-footnote{text-align:center}.sidebar{display:none}.main-column{width:100%}.mobile-brand{display:flex;align-items:center;gap:9px}.mobile-brand .brand-icon{width:34px;height:34px;border-radius:10px}.mobile-brand .brand-icon svg{width:22px;height:22px}.mobile-brand strong{font-size:20px;letter-spacing:-.06em}.mobile-brand strong span{color:var(--teal)}.crumb{display:none}.topbar{height:66px;padding:0 22px}.mobile-nav{z-index:20;position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:9px 7px max(9px,env(safe-area-inset-bottom))}.mobile-nav a,.mobile-nav button{background:transparent;border:0;color:var(--muted);min-width:65px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;padding:4px}.mobile-nav .selected,.mobile-nav .active{color:var(--teal-strong)}.mobile-nav svg{width:18px;height:18px}.page{padding:29px 22px 112px}.footer{display:none}}
@media(max-width:530px){.entry-frame{padding:0 18px}.entry-header{min-height:73px}.entry-header .brand-icon{width:36px;height:36px}.entry-header .brand strong{font-size:21px}.entry-hero{padding:33px 0 24px}.entry-copy h1{font-size:46px;margin:18px 0}.entry-copy p{font-size:13px}.hero-micro{margin-top:19px;gap:10px}.hero-micro span{font-size:10px}.hero-instrument{border-radius:18px}.instrument-body{padding:14px 18px 5px}.instrument-reading strong{font-size:48px}.instrument-body>svg{height:100px}.instrument-head{padding:14px 18px}.paths-head{align-items:flex-start;flex-direction:column;gap:6px}.paths-head h2{font-size:26px}.entry-card{padding:22px}.path-icon{margin-top:15px}.entry-footer{font-size:9px;gap:8px}.entry-footer span:last-child{max-width:160px;text-align:right}.entry-footnote{margin-bottom:24px;font-size:10px}.page{padding:25px 16px 110px}.topbar{padding:0 16px}.system-pill{font-size:9px;padding:8px 9px}.overview-strip{padding:23px 19px;align-items:flex-start;flex-direction:column;gap:18px}.overview-strip h2{font-size:20px}.strip-side{width:100%;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}.strip-indicator{font-size:9px}.section-heading{margin-top:15px}.sensor-grid{grid-template-columns:1fr;gap:12px;margin-bottom:15px}.metric{padding:20px;min-height:155px}.metric-number{font-size:36px}.metric-spark{width:90px}.dashboard-grid,.dashboard-bottom{gap:15px}.control-card,.run-card,.activity-card,.chart-card{padding:21px 19px}.control-footer{align-items:flex-start}.recipe-library,.recipe-editor,.history-card{padding:20px}.recipe-choices{grid-template-columns:1fr}.recipe-layout{gap:15px}.editor-row{grid-template-columns:1fr}.step-inputs{grid-template-columns:1fr 1fr}.step-name{grid-column:1/-1}.step-inputs .checkbox-label{height:28px}.page-header{align-items:flex-start;flex-direction:column}.header-action{width:100%}.chart-download{font-size:10px}.records td,.records th{padding:12px 8px}.access-line input{padding:11px 10px}.access-line .btn{padding:10px}.toasts{left:13px;right:13px;bottom:83px;align-items:stretch}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}


/* === FINAL VISUAL REFINEMENTS === */
html{background:var(--bg)}
body{
  font-family:"DM Sans",Inter,ui-sans-serif,system-ui,sans-serif;
  background:
    radial-gradient(ellipse 52% 35% at 97% 4%,rgba(102,103,171,.13),transparent 78%),
    radial-gradient(ellipse 43% 32% at 4% 52%,rgba(123,51,126,.095),transparent 85%),
    linear-gradient(165deg,var(--bg),#F7EDF6 54%,var(--bg));
  background-attachment:fixed;
}
html[data-theme="dark"] body{
  background:
    radial-gradient(ellipse 55% 40% at 90% 0%,rgba(102,103,171,.23),transparent 76%),
    radial-gradient(ellipse 48% 48% at 0% 58%,rgba(123,51,126,.29),transparent 78%),
    linear-gradient(150deg,#17051E,#210635 65%,#16041B);
  background-attachment:fixed;
}
button, input,select{font-family:"DM Sans",Inter,ui-sans-serif,system-ui,sans-serif}
h1,h2,h3,.metric-number,.instrument-reading strong,.brand strong{
  font-family:Manrope,"DM Sans",Inter,ui-sans-serif,system-ui,sans-serif;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.brand-icon{background:linear-gradient(145deg,#7B337E,#420D4B);color:#F5D5E0;box-shadow:0 6px 19px rgba(66,13,75,.15)}
.brand-dot{color:var(--teal-strong)}
.entry-frame{max-width:1480px}
.entry-header{border-color:var(--line)}
.entry-hero{position:relative}
.entry-copy h1{letter-spacing:-.065em}
.entry-copy h1 em{color:var(--teal-strong)}
.hero-instrument{
  transform:rotate(-.6deg);border:1px solid #7B337E;
  background:radial-gradient(circle at 95% 4%,rgba(102,103,171,.33),transparent 52%),linear-gradient(140deg,#420D4B 10%,#210635 95%);
  box-shadow:0 26px 65px rgba(66,13,75,.22),0 1px 0 rgba(255,255,255,.12) inset;
}
.instrument-live{color:#F5D5E0}
.instrument-reading strong{color:#FFF4FC}
.instrument-reading strong span{color:#E2CAD8}
.instrument-head{color:#E2CAD8}
.instrument-footer{color:#D8B7D6}
.card{
  box-shadow:var(--shadow),0 1px 0 var(--card-highlight) inset;
  border-color:var(--line);
  background:linear-gradient(180deg,var(--surface),var(--surface-quiet));
}
.sidebar{
  background:linear-gradient(165deg,var(--surface) 10%,var(--surface-soft) 140%);
  border-right-color:var(--line);
}
.topbar{
  background:color-mix(in srgb,var(--surface) 84%,transparent);
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}
.overview-strip{
  background:
   radial-gradient(circle at 88% 0%,rgba(102,103,171,.62),transparent 48%),
   linear-gradient(105deg,#420D4B,#210635 95%);
  box-shadow:0 19px 44px rgba(66,13,75,.16);
  border:1px solid rgba(245,213,224,.16);
}
.overview-strip:after{right:8%;border-color:#F5D5E03B;box-shadow:0 0 0 32px #F5D5E00A,0 0 0 72px #F5D5E006}
.overview-strip .eyebrow{color:#E2CAD8}
.overview-strip h2{color:#FFFFFF}
.overview-strip p,.strip-indicator{color:#F5D5E0}
.btn.primary{background:#7B337E;border-color:#7B337E;color:#FFF6FC}
.btn.primary:hover:not(:disabled){background:#632566;border-color:#632566}
html[data-theme="dark"] .btn.primary{background:#C18FC2;border-color:#C18FC2;color:#210635}
html[data-theme="dark"] .btn.primary:hover:not(:disabled){background:#E2CAD8;border-color:#E2CAD8}
.btn.stop-btn{color:#8E2D58;background:#FBEAF1;border-color:#E4B8D4}
html[data-theme="dark"] .btn.stop-btn{color:#FFC4DE;background:#48213F;border-color:#875478}
.btn.light-outline{border-color:rgba(245,213,224,.44);background:rgba(245,213,224,.075);color:#FFF4FC}
.btn.light-outline:hover:not(:disabled){background:rgba(245,213,224,.18)}
.status-lamp,.tiny-circle,.event-marker{background:var(--teal-strong)}
.legend-dot.mint{background:var(--teal-strong)}
.legend-dot.blue{background:var(--ocean)}
/* Sensor cards: the graph and channel label have their own column, no absolute positioning. */
.metric{min-height:204px;padding:25px 27px;position:relative;overflow:hidden}
.metric-top{font-size:12px;color:var(--muted);gap:10px}
.metric-icon{color:var(--teal-strong)}
.metric-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,38%);gap:20px;align-items:end;margin-top:18px;min-width:0}
.metric-reading{min-width:0;align-self:end}
.metric-number{font-size:clamp(31px,3.1vw,44px);line-height:1.22;margin:0;font-weight:800;letter-spacing:-.063em;white-space:nowrap}
.metric-bottom{margin-top:12px;white-space:nowrap;display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted)}
.metric-chart{display:flex;flex-direction:column;gap:9px;align-items:flex-end;justify-content:flex-end;min-width:0}
.metric-spark{position:relative;right:auto;bottom:auto;max-width:100%;width:200px;height:50px;opacity:.96}
.metric-spark svg{width:100%;height:100%;display:block}
.metric-alias{display:block;margin:0;text-align:right;font-size:10px;color:var(--muted);letter-spacing:.075em;font-weight:700;white-space:nowrap}
/* Branded geometry without overwhelming the dashboard */
.main-column{position:relative;min-width:0}
.main-column:before{content:"";position:absolute;inset:72px 0 auto; height:310px;pointer-events:none;z-index:0;
 background:radial-gradient(ellipse 43% 65% at 81% 0,rgba(102,103,171,.095),transparent 83%)}
.page,.footer{position:relative;z-index:1}
.page-header h1{letter-spacing:-.06em}
.section-heading h2,.panel-top h2{letter-spacing:-.04em}
.graph{border-radius:12px;padding:5px 2px 0}
.records tr:hover td{background:var(--surface-soft)}
.entry-footer,.footer{gap:12px 24px;flex-wrap:wrap}
.creator-credit{font-size:11px;color:var(--muted);white-space:normal}
.creator-credit a{font-weight:800;color:var(--teal-strong);text-decoration:none}
.creator-credit a:hover{text-decoration:underline;text-underline-offset:3px}
html[data-theme="dark"] .metric{background:linear-gradient(155deg,#2E103B,#240A30)}
html[data-theme="dark"] .card{box-shadow:var(--shadow),0 1px 0 rgba(245,213,224,.035) inset}
html[data-theme="dark"] .sidebar{background:linear-gradient(160deg,#210635,#2A0F39)}
html[data-theme="dark"] .metric-alias{color:#C5AFCD}
@media (max-width:1270px){
 .metric-main{gap:10px;grid-template-columns:minmax(0,1fr) minmax(130px,36%)}
 .metric{padding:22px}
}
@media (max-width:1050px){
 .metric-main{grid-template-columns:minmax(0,1fr) minmax(150px,38%)}
}
@media (max-width:625px){
 .metric{padding:20px;min-height:208px}
 .metric-main{grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}
 .metric-number{font-size:clamp(31px,7vw,41px)}
 .metric-chart{flex-direction:row;align-items:center;justify-content:space-between;gap:10px}
 .metric-spark{height:38px;width:min(56%,185px)}
 .metric-alias{text-align:right;margin-left:auto}
 .entry-footer,.footer{justify-content:flex-start}
}
@media(max-width:790px){.footer{display:flex;padding-bottom:92px}}
@media(max-width:395px){
 .metric-main{gap:9px}.metric{padding:17px}.metric-bottom{white-space:normal}
 .metric-chart{align-items:center}
 .metric-alias{font-size:9px}
 .entry-footer{font-size:10px}
}
