*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:#eef4f5;color:#17322b;font-family:Arial,Tahoma,sans-serif}main{max-width:1080px;margin:auto;padding:24px}
header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px;padding:4px 2px}h1{font-size:27px;margin:0;color:#123c31;letter-spacing:0}header p{margin:6px 0 0;color:#61736e;font-size:13px}.badges{display:flex;gap:8px;flex-wrap:wrap}.badge{padding:8px 12px;border:1px solid #c6d2ce;background:#fff;border-radius:999px;font-size:12px;font-weight:700;box-shadow:0 3px 10px rgba(35,75,63,.06)}.ok{color:#087f5b;border-color:#8ed1ba;background:#edfff8}.bad{color:#b42318;border-color:#efaaa4;background:#fff5f5}
.header-actions{display:flex;align-items:flex-end;flex-direction:column;gap:9px}.user-session{display:flex;align-items:center;gap:9px;color:#60716b;font-size:11px}.user-session button{border:1px solid #b9c8c3;background:#fff;color:#234b3f;border-radius:6px;padding:6px 9px;font-weight:700;cursor:pointer}
.login-view{min-height:100vh;display:grid;place-items:center;padding:22px;background:linear-gradient(135deg,#071d38 0 54%,#0a6574 54% 72%,#16a085 72%)}.login-panel{width:min(100%,410px);background:#fff;border:1px solid rgba(255,255,255,.5);border-radius:8px;padding:34px;box-shadow:0 28px 70px rgba(0,17,38,.34);position:relative;overflow:hidden}.login-panel:before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,#11a8c5,#18a67d,#ffb324)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:29px}.login-brand strong{display:block;color:#071d38;font-size:15px;letter-spacing:1.5px}.login-brand span{display:block;color:#73818d;font-size:9px;margin-top:3px;letter-spacing:1px}.login-mark{width:48px;height:48px;display:grid;place-items:center;background:#071d38;color:#fff;font-size:25px;font-weight:900;border-radius:6px;border-bottom:4px solid #11a8c5}.login-panel h1{font-size:26px;color:#071d38}.login-panel p{margin:8px 0 25px;color:#657381;font-size:13px}.login-panel label{display:block;margin:15px 0 7px;font-size:12px;font-weight:800;color:#263b50}.login-panel input{width:100%;height:46px;border:1px solid #b7c4ce;border-radius:6px;padding:0 12px;font:inherit;background:#f9fbfc;color:#12283d}.login-panel input:focus{outline:3px solid rgba(17,168,197,.18);border-color:#1198b3}.username-field{display:flex;align-items:center;border:1px solid #b7c4ce;border-radius:6px;background:#f9fbfc;overflow:hidden}.username-field:focus-within{outline:3px solid rgba(17,168,197,.18);border-color:#1198b3}.username-field input{border:0;border-radius:0;outline:0!important;min-width:0}.username-field span{height:46px;display:flex;align-items:center;padding:0 12px;border-left:1px solid #d9e1e6;background:#eef3f5;color:#526777;font-size:13px;white-space:nowrap}.login-panel button{width:100%;height:47px;margin-top:21px;border:0;border-radius:6px;background:#071d38;color:#fff;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 8px 18px rgba(7,29,56,.2);transition:background .2s,transform .2s}.login-panel button:hover{background:#0a6574;transform:translateY(-1px)}.login-panel button:disabled{opacity:.55;cursor:wait;transform:none}.login-error{min-height:18px;margin-top:14px;color:#b42318;font-size:12px;text-align:center}
.summary{display:grid;grid-template-columns:repeat(2,1fr);border:1px solid #c7d7d1;background:#fff;margin-bottom:20px;border-radius:8px;overflow:hidden;box-shadow:0 8px 24px rgba(35,75,63,.07)}.summary div{padding:15px 17px;border-right:1px solid #e0e7e4;min-width:0}.summary div:last-child{border:0}.summary span{display:block;color:#70817b;font-size:11px;margin-bottom:6px}.summary strong{display:block;font-size:14px;overflow-wrap:anywhere}
.valves{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.valve{min-width:0;background:#fff;border:1px solid #c5d6d0;border-radius:8px;overflow:hidden;box-shadow:0 12px 30px rgba(25,67,54,.09);transition:border-color .4s,box-shadow .4s}.valve.open,.valve.opening{border-color:#66bda1;box-shadow:0 14px 34px rgba(8,127,91,.15)}.valve-top{padding:17px 19px;border-bottom:1px solid #e1e8e5;display:flex;justify-content:space-between;gap:12px;align-items:center;background:#fbfdfc}.valve-top h2{font-size:18px;margin:0;letter-spacing:0}.serial{font-size:12px;color:#71817c;margin-top:5px}.state{padding:7px 10px;border-radius:999px;background:#eef2f1;color:#60716b;font-size:11px;font-weight:700;white-space:nowrap}.state.on{background:#e8fff7;color:#087f5b}.state.off{background:#fff0ef;color:#b42318}.state.wait{background:#fff8dc;color:#8a6100}
.visual{height:245px;position:relative;background:#f4f8f7;overflow:hidden;display:flex;align-items:center;justify-content:center}.field{position:absolute;inset:auto 0 0;height:56px;background:#dceadf;border-top:1px solid #c4d9c9}.pipe{position:absolute;width:82%;height:34px;background:#8d9c99;border:5px solid #6e7d7a}.pipe:after{content:"";position:absolute;inset:5px;background:#bec9c6}.water{position:absolute;inset:5px;background:repeating-linear-gradient(90deg,#22a8d8 0 28px,#70d4ef 28px 44px);opacity:0;transition:opacity .55s}.valve.flowing .water{opacity:1;animation:flow .7s linear infinite}
.wheel{position:absolute;z-index:2;width:174px;height:70px;background:transparent;transform:rotate(0);transition:transform 5s ease-in-out;filter:drop-shadow(0 4px 2px rgba(29,53,46,.16))}.wheel:before,.wheel:after{content:"";position:absolute;width:70px;height:48px;top:50%;background:#75847f;border:5px solid #5f6e69;transition:background .6s,border-color .6s;transform:translate(-50%,-50%)}.wheel:before{left:20%;border-radius:28px 7px 7px 28px;clip-path:polygon(0 12%,100% 34%,100% 66%,0 88%)}.wheel:after{left:80%;border-radius:7px 28px 28px 7px;clip-path:polygon(0 34%,100% 12%,100% 88%,0 66%)}.valve.opening .wheel,.valve.open .wheel{transform:rotate(90deg)}.valve.opening .wheel:before,.valve.opening .wheel:after,.valve.open .wheel:before,.valve.open .wheel:after,.valve.closing .wheel:before,.valve.closing .wheel:after{background:#0b8f68;border-color:#087156}.hub{position:absolute;z-index:3;width:42px;height:42px;border-radius:50%;background:#596963;border:6px solid #e2e8e6}.valve.opening .hub,.valve.open .hub,.valve.closing .hub{background:#087f5b}.stem{position:absolute;z-index:1;width:22px;height:76px;background:#687873;top:94px}.outlet{position:absolute;right:9%;top:50%;width:44px;height:72px;border-right:14px solid #6e7d7a;border-bottom:14px solid #6e7d7a;border-radius:0 0 20px 0;z-index:2}.stream{position:absolute;right:calc(9% - 2px);top:145px;width:13px;height:55px;background:repeating-linear-gradient(180deg,#20a9da 0 13px,#75d9f1 13px 23px);opacity:0;z-index:3;animation:waterfall .55s linear infinite}.splash{position:absolute;right:calc(9% - 21px);bottom:31px;width:54px;height:12px;border-radius:50%;background:#5cc9e8;opacity:0;z-index:3}.valve.flowing .stream,.valve.flowing .splash{opacity:1}
.controls{padding:18px 19px}.control-title{font-size:12px;font-weight:700;color:#62746e;margin-bottom:8px}.switch{position:relative;display:block;width:100%;height:64px}.switch input{position:absolute;opacity:0;pointer-events:none}.slider{position:absolute;inset:0;background:#e9eeec;border:1px solid #c8d2cf;border-radius:8px;cursor:pointer;transition:.3s}.slider:before{content:"OFF";position:absolute;width:50%;height:54px;left:4px;top:4px;border-radius:6px;background:#fff;color:#8b312b;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800;box-shadow:0 4px 12px rgba(24,58,48,.15);transition:.35s}.switch input:checked+.slider{background:#dff5ed;border-color:#78bea8}.switch input:checked+.slider:before{content:"ON";transform:translateX(calc(100% - 8px));background:#07805d;color:#fff}.switch input:disabled+.slider{cursor:not-allowed;opacity:.55}
.runtime{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin-top:14px;background:#dfe8e5;border:1px solid #dfe8e5;border-radius:6px;overflow:hidden}.runtime div{background:#f8fbfa;padding:10px 12px}.runtime span{display:block;font-size:10px;color:#73837e;margin-bottom:5px}.runtime strong{font-size:15px;color:#174c3e}.safety{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:13px;border-top:1px solid #e2e9e6}.safety label{font-size:12px;font-weight:700;color:#425850}.safety label small{display:block;margin-top:3px;font-size:10px;font-weight:400;color:#7a8984}.safety-input{display:flex;align-items:center;gap:7px}.safety input{width:78px;padding:9px;border:1px solid #b9c8c3;border-radius:5px;font:inherit;text-align:right;background:#f9fbfa}.safety span{font-size:12px;color:#697b75}.meta{margin-top:12px;color:#64756f;font-size:12px;line-height:1.55;min-height:38px}.mode{margin-top:9px;font-size:12px;font-weight:700;color:#087f5b}.note{margin-top:20px;padding:14px 16px;border-left:4px solid #16876a;background:#fff;color:#536660;font-size:12px;line-height:1.55;box-shadow:0 6px 18px rgba(35,75,63,.05)}
@keyframes flow{to{background-position:44px 0}}@keyframes waterfall{to{background-position:0 23px}}@media(max-width:980px){.valves{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){main{padding:14px}header{align-items:flex-start;flex-direction:column}.header-actions{align-items:flex-start}.summary{grid-template-columns:1fr}.summary div{border-right:0;border-bottom:1px solid #e0e7e4}.valves{grid-template-columns:1fr}.state{white-space:normal;text-align:center}.login-panel{padding:24px}}

/* Merlinium Farm public site */
:root{--mf-navy:#061f4a;--mf-blue:#0756ad;--mf-bright:#0877cf;--mf-green:#5b963f;--mf-gold:#e7bd22;--mf-ink:#10284d;--mf-paper:#f6f9fc}
html{scroll-behavior:smooth}body{background:var(--mf-paper);color:var(--mf-ink)}body.modal-open{overflow:hidden}
.site-nav{position:absolute;z-index:20;top:0;left:0;right:0;height:82px;padding:0 max(28px,calc((100% - 1180px)/2));display:flex;align-items:center;justify-content:space-between;color:#fff;border-bottom:1px solid rgba(255,255,255,.22)}
.brand-lockup{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none}.brand-lockup strong{display:block;font-size:15px;letter-spacing:1.1px}.brand-lockup small{display:block;margin-top:3px;font-size:9px;letter-spacing:1px;opacity:.76}.brand-symbol{width:42px;height:42px;display:grid;place-items:center;background:#fff;color:var(--mf-blue);border-radius:5px;border-bottom:4px solid var(--mf-gold);font-size:23px;font-weight:900;flex:0 0 auto}
.nav-links{display:flex;align-items:center;gap:28px}.nav-links a{color:#fff;text-decoration:none;font-size:13px;font-weight:700}.nav-login,.primary-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:5px;font-weight:800;cursor:pointer}.nav-login{height:42px;padding:0 17px;background:#fff;color:var(--mf-blue)}.nav-login svg,.primary-action svg,.text-action svg,.feature-list svg,.capability-grid svg,.user-session svg{width:17px;height:17px}
.hero{position:relative;min-height:calc(100vh - 36px);background:url("assets/hero-smart-valve.png") center/cover no-repeat;color:#fff;display:flex;align-items:center;padding:112px max(28px,calc((100% - 1180px)/2)) 128px;overflow:hidden}.hero-overlay{position:absolute;inset:0;background:rgba(2,24,57,.68)}.hero-content{position:relative;z-index:2;width:min(680px,100%)}.eyebrow{margin:0 0 13px;color:var(--mf-green);font-size:12px;font-weight:900;letter-spacing:1.6px}.hero .eyebrow{color:#d9ef82}.hero h1{max-width:650px;color:#fff;font-size:56px;line-height:1.08;margin:0;letter-spacing:0}.hero-copy{max-width:610px;margin:22px 0 0;font-size:18px;line-height:1.7;color:#eef5ff}.hero-actions{display:flex;align-items:center;gap:24px;margin-top:31px}.primary-action{height:50px;padding:0 21px;background:var(--mf-gold);color:#14284b}.text-action{display:inline-flex;align-items:center;gap:8px;color:#fff;text-decoration:none;font-size:13px;font-weight:800}.hero-facts{position:absolute;z-index:2;left:max(28px,calc((100% - 1180px)/2));right:max(28px,calc((100% - 1180px)/2));bottom:0;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid rgba(255,255,255,.35)}.hero-facts span{padding:22px 22px 24px 0;color:#dce8f5;font-size:12px;line-height:1.45}.hero-facts strong{display:block;color:#fff;font-size:14px;margin-bottom:4px}
.technology-section,.solution-section,.platform-section{padding:90px max(28px,calc((100% - 1180px)/2))}.section-heading{max-width:760px}.section-heading h2,.solution-copy h2{font-size:36px;line-height:1.23;margin:0;color:var(--mf-navy);letter-spacing:0}.section-heading>p:last-child,.solution-copy>p{font-size:15px;line-height:1.75;color:#607189;margin:17px 0 0}.capability-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:45px;border-top:1px solid #d5dfeb;border-bottom:1px solid #d5dfeb}.capability-grid article{padding:32px 25px;border-right:1px solid #d5dfeb}.capability-grid article:last-child{border-right:0}.capability-grid svg{width:28px;height:28px;color:var(--mf-blue)}.capability-grid h3{font-size:16px;color:var(--mf-blue);margin:18px 0 9px}.capability-grid p{font-size:12px;line-height:1.65;color:#64758a;margin:0}
.solution-section{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);gap:64px;align-items:center;background:#fff}.solution-image{min-height:460px}.solution-image img{width:100%;height:100%;min-height:460px;object-fit:cover;object-position:center;border-radius:6px}.feature-list{list-style:none;padding:0;margin:28px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:15px 22px}.feature-list li{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700;color:#29466c}.feature-list svg{color:var(--mf-green);border:1px solid #9cbd8a;border-radius:50%;padding:3px}
.platform-section{background:#eef4f8}.platform-section .section-heading{margin:0 auto;text-align:center}.platform-visuals{display:grid;grid-template-columns:1fr .72fr 1.25fr;gap:18px;margin-top:46px}.platform-visuals figure{margin:0;position:relative;height:310px;overflow:hidden;border-radius:6px;background:#fff}.platform-visuals img{width:100%;height:100%;object-fit:cover}.platform-visuals figcaption{position:absolute;left:0;right:0;bottom:0;padding:14px 16px;background:rgba(4,34,77,.88);color:#fff;font-size:13px;font-weight:800}
footer{padding:28px max(28px,calc((100% - 1180px)/2));background:var(--mf-blue);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px}.footer-brand .brand-symbol{width:38px;height:38px}.footer-brand small{color:#d6e7ff}footer p{font-size:11px;letter-spacing:.5px;opacity:.8}
.login-modal{position:fixed;z-index:100;inset:0;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(3,20,45,.78);cursor:default}.login-modal .login-panel{position:relative;z-index:1;width:min(100%,410px);background:#fff;border:0;border-radius:7px;padding:34px;box-shadow:0 28px 70px rgba(0,17,38,.4)}.login-modal .login-panel:before{background:var(--mf-blue)}.login-modal .login-mark{background:var(--mf-blue);border-bottom-color:var(--mf-gold)}.login-modal .login-brand strong,.login-modal .login-panel h2{color:var(--mf-navy)}.login-modal .login-panel h2{font-size:24px;margin:0}.login-modal .login-panel button[type="submit"]{background:var(--mf-blue)}.modal-close{position:absolute;top:13px;right:13px!important;width:34px!important;height:34px!important;margin:0!important;padding:0!important;border:1px solid #d6e0ea!important;background:#fff!important;color:#52667e!important;box-shadow:none!important}.modal-close svg{width:18px;height:18px}
.dashboard-shell{max-width:1180px}.dashboard-title{display:flex;align-items:center;gap:12px}.dashboard-title .brand-symbol{background:var(--mf-blue);color:#fff}.dashboard-title h1{color:var(--mf-navy)}.dashboard-shell .summary{border-color:#cbd9e8}.dashboard-shell .valve{border-color:#cbd9e8}.dashboard-shell .mode{color:var(--mf-blue)}.dashboard-shell .switch input:checked+.slider:before{background:var(--mf-blue)}.dashboard-shell .valve.open,.dashboard-shell .valve.opening{border-color:#79a7d7;box-shadow:0 14px 34px rgba(7,86,173,.14)}.user-session button{display:inline-flex;align-items:center;gap:6px;color:var(--mf-blue);border-color:#b9cbe0}.user-session>svg{color:var(--mf-blue)}
@media(max-width:900px){.nav-links>a{display:none}.hero h1{font-size:46px}.capability-grid{grid-template-columns:1fr 1fr}.capability-grid article:nth-child(2){border-right:0}.capability-grid article:nth-child(-n+2){border-bottom:1px solid #d5dfeb}.solution-section{grid-template-columns:1fr}.solution-image{min-height:380px}.solution-image img{min-height:380px}.platform-visuals{grid-template-columns:1fr 1fr}.platform-visuals figure:last-child{grid-column:1/-1}}
@media(max-width:620px){.site-nav{height:70px;padding:0 16px}.brand-lockup strong{font-size:12px}.brand-lockup small{font-size:7px}.brand-symbol{width:36px;height:36px;font-size:19px}.nav-links{gap:10px}.nav-login{height:38px;padding:0 12px}.hero{min-height:calc(100svh - 30px);padding:105px 18px 185px;background-position:48% center}.hero h1{font-size:39px}.hero-copy{font-size:15px}.hero-actions{align-items:flex-start;flex-direction:column;gap:16px}.hero-facts{left:18px;right:18px;grid-template-columns:1fr}.hero-facts span{padding:9px 0}.hero-facts span:not(:last-child){border-bottom:1px solid rgba(255,255,255,.18)}.technology-section,.solution-section,.platform-section{padding:64px 18px}.section-heading h2,.solution-copy h2{font-size:29px}.capability-grid{grid-template-columns:1fr}.capability-grid article{border-right:0;border-bottom:1px solid #d5dfeb}.feature-list{grid-template-columns:1fr}.platform-visuals{grid-template-columns:1fr}.platform-visuals figure,.platform-visuals figure:last-child{grid-column:auto;height:260px}footer{align-items:flex-start;flex-direction:column}.solution-image,.solution-image img{min-height:300px}.login-modal .login-panel{padding:28px 22px}.dashboard-shell{padding:14px}}

/* Dashboard automation */
.dashboard-tabs{display:flex;align-items:center;gap:4px;margin:0 0 18px;padding:4px;background:#dfe8f1;border:1px solid #c7d5e3;border-radius:7px;width:max-content;max-width:100%}.dashboard-tab{height:40px;padding:0 15px;border:0;border-radius:5px;background:transparent;color:#526a83;font-weight:800;display:flex;align-items:center;gap:8px;cursor:pointer}.dashboard-tab svg{width:17px;height:17px}.dashboard-tab.active{background:#fff;color:var(--mf-blue);box-shadow:0 3px 10px rgba(6,31,74,.1)}.dashboard-tab b{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#c72d2d;color:#fff;font-size:10px;display:grid;place-items:center}
.dashboard-view{min-width:0}.automation-layout{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr);gap:18px}.schedule-editor,.schedule-list-panel,.activity-panel,.notification-panel{background:#fff;border:1px solid #cbd9e8;border-radius:8px;padding:20px;box-shadow:0 10px 28px rgba(6,31,74,.07)}.section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}.section-title>svg{width:24px;height:24px;color:var(--mf-blue)}.section-title span{display:block;color:#72849a;font-size:10px;font-weight:900;margin-bottom:4px}.section-title h2{font-size:19px;color:var(--mf-navy);margin:0}.schedule-editor>label,.form-grid label{display:block;color:#425873;font-size:11px;font-weight:800;margin:0 0 6px}.schedule-editor>input,.form-grid input,.form-grid select{width:100%;height:43px;border:1px solid #b9c9d8;border-radius:5px;background:#f9fbfd;color:#183552;padding:0 11px;font:inherit}.form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-top:14px}.input-unit{display:flex;border:1px solid #b9c9d8;border-radius:5px;overflow:hidden;background:#f9fbfd}.input-unit input{border:0;border-radius:0;min-width:0}.input-unit span{display:flex;align-items:center;padding:0 10px;border-left:1px solid #d6e0e9;color:#60748a;font-size:11px}.day-picker{border:0;padding:0;margin:18px 0 14px;display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.day-picker legend{color:#425873;font-size:11px;font-weight:800;margin-bottom:8px}.day-picker label{position:relative}.day-picker input{position:absolute;opacity:0}.day-picker span{height:36px;border:1px solid #c4d2df;border-radius:5px;display:grid;place-items:center;color:#65798e;font-size:10px;font-weight:800;cursor:pointer}.day-picker input:checked+span{background:var(--mf-blue);border-color:var(--mf-blue);color:#fff}.enabled-row{display:flex!important;align-items:center;gap:8px;margin:14px 0!important}.enabled-row input{width:17px!important;height:17px!important}.editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.primary-button,.secondary-button,.schedule-action{height:40px;border:0;border-radius:5px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:800;cursor:pointer}.primary-button{background:var(--mf-blue);color:#fff}.secondary-button{background:#edf2f7;color:#49627c}.primary-button svg{width:16px;height:16px}.form-feedback{min-height:17px;margin:10px 0 0;color:#087f5b;font-size:11px;text-align:right}
.schedule-list,.activity-list{display:grid;gap:10px}.schedule-item{display:grid;grid-template-columns:1fr auto;gap:12px;padding:14px;border:1px solid #d5e0eb;border-radius:7px;background:#fbfdff}.schedule-item.disabled{opacity:.58}.schedule-item h3{font-size:14px;color:var(--mf-navy);margin:0}.schedule-meta{display:flex;flex-wrap:wrap;gap:7px 13px;margin-top:8px;color:#65798e;font-size:11px}.schedule-meta span{display:flex;align-items:center;gap:5px}.schedule-meta svg{width:13px;height:13px}.schedule-actions{display:flex;align-items:center;gap:5px}.schedule-action{width:35px;height:35px;padding:0;background:#edf3f8;color:#45627e}.schedule-action.delete{color:#b42318;background:#fff0ef}.schedule-action svg{width:15px;height:15px}.empty-panel{margin:28px 0;color:#7b8da0;text-align:center;font-size:12px}.history-layout{display:grid;grid-template-columns:1.3fr .7fr;gap:18px}.activity-row{display:grid;grid-template-columns:auto 1fr auto;gap:11px;align-items:start;padding:12px 0;border-bottom:1px solid #e3eaf1}.activity-row:last-child{border-bottom:0}.activity-icon{width:32px;height:32px;border-radius:50%;background:#e8f1fb;color:var(--mf-blue);display:grid;place-items:center}.activity-icon.error{background:#fff0ef;color:#b42318}.activity-icon.warning{background:#fff7df;color:#946200}.activity-icon.success{background:#eaf7ed;color:#37803c}.activity-icon svg{width:15px;height:15px}.activity-row strong{display:block;color:#213c59;font-size:12px}.activity-row p{margin:4px 0 0;color:#718398;font-size:10px}.activity-row time{color:#8795a5;font-size:9px;white-space:nowrap}
@media(max-width:980px){.automation-layout,.history-layout{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}.schedule-list-panel{grid-row:2}}@media(max-width:620px){.dashboard-tabs{width:100%}.dashboard-tab{flex:1;padding:0 8px}.form-grid{grid-template-columns:1fr}.day-picker{grid-template-columns:repeat(4,1fr)}.schedule-item{grid-template-columns:1fr}.schedule-actions{justify-content:flex-end}}

/* Device card scheduling */
.valve-top{align-items:flex-start}.valve-top>div{min-width:0}.valve-top .meta{min-height:0;margin-top:7px;font-size:10px;line-height:1.35;color:#75869a;max-width:230px}.controls>.safety{display:none}.card-tools{margin-top:13px}.tool-button{width:100%;height:42px;border:1px solid #c7d5e3;border-radius:6px;background:#f7fafd;color:#355371;padding:0 12px;display:flex;align-items:center;gap:8px;cursor:pointer;font:inherit}.tool-button svg{width:16px;height:16px;color:var(--mf-blue)}.tool-button span{font-size:11px;font-weight:800}.tool-button strong{margin-left:auto;color:var(--mf-blue);font-size:12px}.card-schedules{margin:16px -19px -18px;border-top:1px solid #dce5ed;background:#f8fbfd}.card-schedule-head{height:54px;padding:0 14px 0 19px;display:flex;align-items:center;justify-content:space-between}.card-schedule-head span{display:block;color:#7b8da0;font-size:9px;font-weight:900}.card-schedule-head strong{display:block;color:#203e5e;font-size:13px;margin-top:2px}.add-schedule-button{width:34px;height:34px;border:0;border-radius:50%;background:var(--mf-blue);color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 5px 12px rgba(7,86,173,.22)}.add-schedule-button svg{width:17px;height:17px}.device-schedule-list{border-top:1px solid #e2e9f0}.device-schedule-list>p{margin:0;padding:13px 19px;color:#8a98a7;font-size:10px}.device-schedule-row{min-height:48px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border-bottom:1px solid #e1e8ef}.device-schedule-row:last-child{border-bottom:0}.device-schedule-row.disabled{opacity:.5}.device-schedule-summary{height:100%;min-width:0;padding:8px 8px 8px 19px;border:0;background:transparent;text-align:left;display:grid;grid-template-columns:52px 46px minmax(0,1fr);align-items:center;gap:7px;cursor:pointer}.schedule-time{color:var(--mf-blue);font-size:13px;font-weight:900}.schedule-duration{color:#36536f;font-size:10px;font-weight:800}.schedule-days{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7a8b9d;font-size:9px}.device-schedule-actions{display:flex;gap:3px;padding-right:8px}.device-schedule-actions .schedule-action{width:29px;height:29px;border-radius:5px}.device-schedule-actions .schedule-action svg{width:13px;height:13px}
.control-modal{position:fixed;z-index:120;inset:0;display:grid;place-items:center;padding:18px}.control-modal-backdrop{position:absolute;inset:0;border:0;background:rgba(3,20,45,.78)}.control-modal-panel{position:relative;z-index:1;width:min(100%,560px);max-height:calc(100vh - 36px);overflow:auto;background:#fff;border-radius:8px;padding:26px;box-shadow:0 28px 70px rgba(0,17,38,.4)}.control-modal-panel .modal-close{top:12px!important;right:12px!important}.control-modal-panel .section-title{padding-right:35px}.form-grid.compact{grid-template-columns:1fr 1fr}.safety-editor{width:min(100%,420px)}.safety-editor>label{display:block;color:#425873;font-size:11px;font-weight:800;margin-bottom:7px}.input-unit.large input{height:48px;width:100%;border:0;padding:0 12px;font:inherit}.input-unit.large span{font-size:12px}
@media(max-width:620px){.control-modal{padding:10px}.control-modal-panel{padding:22px 17px;max-height:calc(100vh - 20px)}.form-grid.compact{grid-template-columns:1fr}.device-schedule-summary{grid-template-columns:48px 42px minmax(0,1fr);padding-left:14px}.card-schedules{margin-left:-19px;margin-right:-19px}}
.device-name-row{display:flex;align-items:center;gap:6px;min-width:0}.device-name-row h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rename-device-button{width:28px;height:28px;flex:0 0 auto;border:0;border-radius:5px;background:transparent;color:#6f8296;display:grid;place-items:center;cursor:pointer}.rename-device-button:hover{background:#eaf1f7;color:var(--mf-blue)}.rename-device-button svg{width:14px;height:14px}.rename-editor{width:min(100%,430px)}.rename-editor>label{display:block;color:#425873;font-size:11px;font-weight:800;margin-bottom:7px}.rename-editor>input[type="text"]{width:100%;height:46px;border:1px solid #b9c9d8;border-radius:5px;background:#f9fbfd;color:#183552;padding:0 12px;font:inherit}
.runtime-safety{position:relative;width:100%;border:0;background:#f8fbfa;padding:10px 34px 10px 12px;text-align:left;cursor:pointer;color:inherit}.runtime-safety span{display:block;font-size:10px;color:#73837e;margin-bottom:5px}.runtime-safety strong{font-size:15px;color:#174c3e}.runtime-safety svg{position:absolute;right:11px;top:50%;width:15px;height:15px;color:var(--mf-blue);transform:translateY(-50%)}.runtime-safety:hover{background:#edf5fb}
.day-picker{grid-template-columns:repeat(8,1fr)}.day-picker .all-days span{border-color:#8ca7c2;color:var(--mf-blue)}
.time-select{height:43px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:7px}.time-select select{width:100%;height:43px;border:1px solid #b9c9d8;border-radius:5px;background:#f9fbfd;color:#183552;padding:0 10px;font:inherit;font-weight:800}.time-select>span{color:#526b83;font-size:18px;font-weight:900}
@media(max-width:620px){.day-picker{grid-template-columns:repeat(4,1fr)}}

/* Valve history timeline */
.timeline-panel{min-width:0}.timeline-title{align-items:flex-start}.timeline-date-control{height:38px;display:flex;align-items:center;gap:7px;padding:0 9px;border:1px solid #c6d4e1;border-radius:5px;background:#f8fbfd;color:var(--mf-blue)}.timeline-date-control svg{width:15px;height:15px}.timeline-date-control input{border:0;background:transparent;color:#254563;font:inherit;font-size:11px;font-weight:800;outline:0}.timeline-hours{display:grid;grid-template-columns:110px repeat(8,1fr);margin-bottom:5px;color:#8797a8;font-size:9px}.timeline-hours span:first-child{grid-column:2}.timeline-hours span{text-align:left}.timeline-hours span:last-child{text-align:right}.timeline-chart{display:grid;gap:8px}.timeline-row{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;align-items:center}.timeline-zone{min-width:0}.timeline-zone strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#294661;font-size:11px}.timeline-zone small{display:block;margin-top:2px;color:#8a98a7;font-size:8px}.timeline-track{position:relative;height:30px;border:1px solid #d8e2eb;border-radius:4px;background-color:#f8fafc;background-image:linear-gradient(to right,transparent calc(12.5% - 1px),#e1e8ef calc(12.5% - 1px),#e1e8ef 12.5%);background-size:12.5% 100%;overflow:hidden}.timeline-bar{position:absolute;top:5px;height:18px;min-width:3px;border-radius:3px;background:#0877cf;box-shadow:0 2px 7px rgba(8,119,207,.25)}.timeline-bar.active{background:repeating-linear-gradient(135deg,#0877cf 0,#0877cf 8px,#35a5e8 8px,#35a5e8 15px);background-size:22px 22px;animation:timeline-flow 1.2s linear infinite;box-shadow:0 0 0 1px rgba(8,119,207,.14),0 2px 9px rgba(8,119,207,.32)}@keyframes timeline-flow{to{background-position:22px 0}}.timeline-key{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 18px;padding-top:11px;border-top:1px solid #e2e9f0;color:#657a90;font-size:10px}.timeline-key>span{display:flex;align-items:center;gap:6px}.timeline-key i{width:15px;height:8px;border-radius:2px;background:#0877cf}.timeline-key small{font-size:9px;color:#8997a5}.timeline-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.timeline-detail{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:10px 11px;border:1px solid #dde6ee;border-radius:5px;background:#fbfdff}.timeline-detail-zone{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#4a647d;font-size:10px}.timeline-detail strong{color:var(--mf-blue);font-size:11px}.timeline-detail small{grid-column:1/-1;color:#8291a0;font-size:9px}.command-history-head{margin:22px 0 5px;padding-top:18px;border-top:1px solid #dce5ed}.command-history-head span{display:block;color:#7b8da0;font-size:9px;font-weight:900}.command-history-head strong{display:block;margin-top:3px;color:#213f5e;font-size:14px}.command-history-list{max-height:360px;overflow:auto}
@media(max-width:620px){.timeline-title{gap:10px}.timeline-date-control{max-width:145px}.timeline-hours{grid-template-columns:70px repeat(8,1fr)}.timeline-row{grid-template-columns:62px minmax(0,1fr);gap:7px}.timeline-zone strong{font-size:9px}.timeline-details{grid-template-columns:1fr}.timeline-key{align-items:flex-start;flex-direction:column}}

/* Session-only Firebase document counter */
.firebase-token{position:fixed;z-index:80;right:18px;bottom:18px;width:260px;min-height:66px;padding:11px 12px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid #b9cde2;border-bottom:3px solid var(--mf-gold);border-radius:7px;background:rgba(255,255,255,.97);box-shadow:0 14px 34px rgba(6,31,74,.18);backdrop-filter:blur(10px)}.firebase-token-icon{width:36px;height:36px;border-radius:6px;background:#e9f2fb;color:var(--mf-blue);display:grid;place-items:center}.firebase-token-icon svg{width:18px;height:18px}.firebase-token strong{display:block;color:var(--mf-navy);font-size:12px}.firebase-token span{display:block;margin-top:3px;color:#718398;font-size:8px;line-height:1.3}.firebase-token b{min-width:40px;padding:7px 8px;border-radius:5px;background:var(--mf-blue);color:#fff;text-align:center;font-size:15px;font-variant-numeric:tabular-nums}
@media(max-width:620px){.firebase-token{right:10px;bottom:10px;width:225px;min-height:58px;padding:9px}.firebase-token-icon{width:32px;height:32px}.firebase-token b{min-width:36px;font-size:13px}}

/* Merlinium CI dashboard skin */
body:has(#dashboard:not([hidden])){background:#edf3f8;color:var(--mf-ink)}
.dashboard-shell{padding-top:18px;padding-bottom:96px}
.dashboard-shell>header{position:relative;margin-bottom:16px;padding:18px 20px;background:var(--mf-navy);border:1px solid #173969;border-bottom:4px solid var(--mf-gold);border-radius:6px;box-shadow:0 12px 28px rgba(6,31,74,.16)}
.dashboard-title .brand-symbol{width:48px;height:48px;background:#fff;color:var(--mf-blue);border-bottom-color:var(--mf-gold);box-shadow:0 5px 14px rgba(0,0,0,.16)}
.dashboard-title h1{color:#fff;font-size:25px}.dashboard-title p{color:#bfcfe4}
.dashboard-shell .header-actions{gap:11px}.dashboard-shell .user-session{color:#d7e3f2}.dashboard-shell .user-session>svg{color:var(--mf-gold)}
.dashboard-shell .user-session button{background:#fff;color:var(--mf-blue);border-color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.dashboard-shell .badge{padding:7px 11px;border-radius:5px;background:#fff;border-color:rgba(255,255,255,.45);box-shadow:none}
.dashboard-shell .badge.ok{color:#1e6f38;background:#effaf1;border-color:#8dc39a}.dashboard-shell .badge.bad{color:#a72d28;background:#fff1ef;border-color:#e9aaa5}
.dashboard-shell .badge.warn{color:#856300;background:#fff8df;border-color:#e6cf76}
.dashboard-tabs{margin-bottom:16px;background:#d8e4f0;border-color:#b7cbe0}.dashboard-tab{color:#415d7c}.dashboard-tab.active{background:var(--mf-blue);color:#fff;box-shadow:0 5px 13px rgba(7,86,173,.22)}
.dashboard-shell .summary{border-color:#bfcfe0;border-top:3px solid var(--mf-gold);box-shadow:0 7px 18px rgba(6,31,74,.07)}
.dashboard-shell .summary div{background:#fff;border-color:#dce5ee}.dashboard-shell .summary span{color:#6e8197;font-weight:800}.dashboard-shell .summary strong{color:var(--mf-navy)}
.dashboard-shell .valves{gap:16px}.dashboard-shell .valve{border-color:#bfcfe0;border-top:4px solid var(--mf-blue);border-radius:6px;box-shadow:0 10px 24px rgba(6,31,74,.09)}
.dashboard-shell .valve.open,.dashboard-shell .valve.opening{border-color:#78aa6a;border-top-color:var(--mf-green);box-shadow:0 12px 28px rgba(63,122,59,.15)}
.dashboard-shell .valve-top{background:#f9fbfd;border-color:#dbe4ed}.dashboard-shell .valve-top h2{color:var(--mf-navy)}.dashboard-shell .serial{color:var(--mf-blue);font-weight:800}
.dashboard-shell .state{border-radius:4px;border:1px solid #d1dce7;background:#edf2f6;color:#52677e}.dashboard-shell .state.on{background:#edf8ef;color:#2e7137;border-color:#9bc6a0}.dashboard-shell .state.off{background:#fff0ef;color:#a92f2a;border-color:#edb1ac}.dashboard-shell .state.wait{background:#fff8df;color:#856300;border-color:#e6cf76}
.dashboard-shell .visual{background:#eef4f8}.dashboard-shell .field{background:#dcebd9;border-top-color:#bed3b8}.dashboard-shell .pipe{background:#7c8d9a;border-color:#5c6f7d}.dashboard-shell .pipe:after{background:#bdcbd3}.dashboard-shell .outlet{border-color:#5c6f7d}
.dashboard-shell .controls{background:#fff}.dashboard-shell .slider{background:#e4ebf1;border-color:#bdcbd8}.dashboard-shell .slider:before{color:#9b342f;box-shadow:0 4px 12px rgba(6,31,74,.14)}.dashboard-shell .switch input:checked+.slider{background:#dcefdc;border-color:#83b67a}.dashboard-shell .switch input:checked+.slider:before{background:var(--mf-green)}
.dashboard-shell .runtime{background:#d5e0ea;border-color:#d5e0ea}.dashboard-shell .runtime div,.dashboard-shell .runtime-safety{background:#f6f9fc}.dashboard-shell .runtime span,.dashboard-shell .runtime-safety span{color:#6c8096;font-weight:800}.dashboard-shell .runtime strong,.dashboard-shell .runtime-safety strong{color:var(--mf-navy)}.dashboard-shell .runtime-safety:hover{background:#eaf2f9}
.dashboard-shell .card-schedules{background:#f4f8fb;border-color:#d5e0ea}.dashboard-shell .card-schedule-head strong{color:var(--mf-navy)}.dashboard-shell .add-schedule-button{background:var(--mf-blue);border-radius:5px}.dashboard-shell .device-schedule-list,.dashboard-shell .device-schedule-row{border-color:#dbe4ed}
.dashboard-shell .note{border-left-color:var(--mf-gold);background:#fff;color:#4c627a;box-shadow:0 6px 16px rgba(6,31,74,.06)}
.dashboard-shell .activity-panel,.dashboard-shell .notification-panel{border-color:#bfcfe0;border-top:4px solid var(--mf-blue);border-radius:6px}.dashboard-shell .notification-panel{border-top-color:var(--mf-gold)}
.dashboard-shell .timeline-bar,.dashboard-shell .timeline-key i{background:var(--mf-blue)}
.dashboard-shell .firebase-token{border-color:#aebfd2;border-bottom-color:var(--mf-gold);border-radius:6px}.dashboard-shell .firebase-token-icon{background:var(--mf-navy);color:#fff}.dashboard-shell .firebase-token b{background:var(--mf-blue)}
.control-modal-panel{border-top:4px solid var(--mf-blue)}.control-modal-panel .section-title>svg{color:var(--mf-blue)}
@media(max-width:760px){.dashboard-shell>header{align-items:stretch;padding:16px}.dashboard-shell .header-actions{align-items:flex-start}.dashboard-shell .badges{gap:5px}.dashboard-shell .badge{font-size:10px;padding:6px 8px}.dashboard-title h1{font-size:21px}}

/* Stable command feedback while waiting for the valve confirmation */
.dashboard-shell .valve.opening .switch input:disabled+.slider,
.dashboard-shell .valve.closing .switch input:disabled+.slider{opacity:1;cursor:wait;border-color:#7ea8d2;box-shadow:inset 0 0 0 1px rgba(7,86,173,.08)}
.dashboard-shell .valve.opening .slider:before,
.dashboard-shell .valve.closing .slider:before{width:calc(100% - 8px);transform:none;background:var(--mf-blue);color:#fff}
.dashboard-shell .valve.opening .slider:before{content:"OPENING..."}
.dashboard-shell .valve.closing .slider:before{content:"CLOSING..."}

/* Merlinium logo image */
.brand-symbol{width:58px;height:58px;padding:4px;overflow:hidden;color:transparent}
.brand-symbol img,.login-mark img{display:block;width:100%;height:100%;object-fit:contain}
.footer-brand .brand-symbol{width:54px;height:54px}
.login-mark{width:78px;height:72px;padding:5px;overflow:hidden;background:#fff;color:transparent}
.login-modal .login-mark{background:#fff;border-bottom-color:var(--mf-gold)}
.dashboard-title .brand-symbol{width:58px;height:58px;background:#fff;color:transparent}
@media(max-width:620px){.brand-symbol{width:48px;height:48px}.footer-brand .brand-symbol{width:46px;height:46px}.login-mark{width:70px;height:64px}.dashboard-title .brand-symbol{width:50px;height:50px}}

/* PDF product image exports */
.hero{background:linear-gradient(90deg,rgba(2,24,57,.94) 0%,rgba(2,24,57,.82) 43%,rgba(2,24,57,.34) 100%),#061f4a url("assets/hero-smart-valve.png?v=20260621-product-clean-2") right center/contain no-repeat}
.hero-overlay{background:rgba(2,24,57,.18)}
.solution-image{display:grid;place-items:center;min-height:460px;background:#fff;border:1px solid #dce6ef;border-radius:6px;overflow:hidden}
.solution-image img{display:block;width:100%;height:auto;min-height:0;padding:10px;border-radius:0;object-fit:contain;object-position:center;background:#fff}
.platform-visuals figure{background:#fff;border:1px solid #dce6ef}
.platform-visuals img{display:block;width:100%;height:100%;padding:10px 10px 48px;object-fit:contain;object-position:center;background:#fff}
@media(max-width:620px){.hero{background-position:58% center;background-size:auto 72%}.solution-image{min-height:300px}.solution-image img{padding:8px}.platform-visuals img{padding:8px 8px 46px}}

/* Clean product-first presentation */
.solution-section{grid-template-columns:minmax(0,1.02fr) minmax(360px,.98fr);gap:54px;background:linear-gradient(180deg,#fff 0%,#f5f9fc 100%)}
.solution-image{aspect-ratio:1651/1145;min-height:0;border:0;border-radius:8px;background:#dfeaf0;box-shadow:0 18px 44px rgba(6,31,74,.12)}
.solution-image img{width:100%;height:100%;min-height:0;padding:0;border-radius:0;object-fit:cover;background:transparent}
.product-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:26px}
.product-detail-grid article{min-width:0;padding:14px;border:1px solid #dbe6ef;border-radius:6px;background:#fff;box-shadow:0 7px 18px rgba(6,31,74,.05)}
.product-detail-grid svg{width:19px;height:19px;color:var(--mf-blue);margin-bottom:10px}
.product-detail-grid strong{display:block;color:var(--mf-navy);font-size:13px;margin-bottom:6px}
.product-detail-grid span{display:block;color:#63758b;font-size:11px;line-height:1.6}
.platform-visuals{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:20px}
.platform-visuals figure.product-card{height:auto;display:flex;flex-direction:column;margin:0;border:1px solid #d4e0eb;border-radius:8px;background:#fff;overflow:hidden;box-shadow:0 14px 34px rgba(6,31,74,.09)}
.product-card-media{height:300px;overflow:hidden;background:#dce9ef}
.product-card-media img{display:block;width:100%;height:100%;padding:0!important;object-fit:cover;object-position:center;background:transparent}
.gateway-card .product-card-media{height:300px;background:#f4f8fb}
.gateway-card .product-card-media img{object-fit:cover;object-position:center}
.platform-visuals figcaption{position:static;padding:17px 18px 19px;background:#fff;color:var(--mf-ink)}
.platform-visuals figcaption strong{display:block;color:var(--mf-blue);font-size:15px;margin-bottom:7px}
.platform-visuals figcaption span{display:block;color:#63758b;font-size:12px;line-height:1.65;font-weight:400}
@media(max-width:900px){.solution-section{grid-template-columns:1fr}.solution-image{aspect-ratio:1651/1145;min-height:0}.solution-image img{min-height:0}.platform-visuals{grid-template-columns:1fr 1fr}.platform-visuals figure.product-card:last-child{grid-column:1/-1}.product-card-media{height:280px}}
@media(max-width:620px){.solution-image{min-height:0}.solution-image img{padding:0}.product-detail-grid{grid-template-columns:1fr}.platform-visuals{grid-template-columns:1fr}.platform-visuals figure.product-card,.platform-visuals figure.product-card:last-child{grid-column:auto;height:auto}.product-card-media{height:230px}.gateway-card .product-card-media{height:280px}.platform-visuals img{padding:0!important}}
