
:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue",Arial,sans-serif;color:#f6fdff;background:#00101c;color-scheme:dark;font-synthesis:none;--aqua:#2de5ee;--mint:#45f0de;--green:#1fe17b;--muted:#c5dde6}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;height:100dvh;overflow:hidden;overscroll-behavior:none}body{background:radial-gradient(ellipse at 58% 0%,#0a6176 0%,transparent 34%),linear-gradient(180deg,#001a29 0%,#001420 52%,#001b28 100%)}
button,input{font:inherit}button{cursor:pointer}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.app{width:min(100%,560px);height:100vh;height:100dvh;display:flex;flex-direction:column;margin:auto;position:relative;isolation:isolate;overflow:hidden;padding:0 10px;box-shadow:0 0 80px #0005}
.mast{position:relative;flex:none;min-height:calc(118px + env(safe-area-inset-top,0px));padding:calc(6px + env(safe-area-inset-top,0px)) 11px 2px;margin:0 -10px;overflow:hidden;background:linear-gradient(90deg,#021926e8 0%,#07364aa8 42%,transparent 100%),linear-gradient(165deg,#042638,#0a4a5f)}
.mast:after{content:"";position:absolute;inset:auto 0 0;height:22px;background:linear-gradient(0deg,#001320,transparent);pointer-events:none;z-index:1}
.mast-art{position:absolute;inset:0;background:linear-gradient(90deg,#041824e8 0%,#03233780 30%,#0000 82%),url('yacht.jpg') right 35% / auto 100% no-repeat;filter:saturate(1.35) contrast(1.12) brightness(.9)}
.brandline{display:flex;align-items:center;gap:8px;position:relative;z-index:2;padding:1px 2px}.mark{width:50px;min-width:50px;color:#39edff;filter:drop-shadow(0 0 5px #16d6ff88)}.mark svg{width:100%;height:auto;stroke:none}
.brandtext{min-width:0;flex:1}.brandtext h1{font-size:clamp(20px,6.2vw,31px);font-weight:500;white-space:nowrap;line-height:1.02;letter-spacing:-1.1px;margin:0;text-shadow:0 2px 8px #001421}.tagline{margin-top:2px;font-size:clamp(10px,3.2vw,14px);font-weight:350;letter-spacing:.15px;color:#b1d0df;line-height:1.02;border-left:2px solid var(--aqua);padding-left:6px}
.gear{width:31px;height:31px;flex-shrink:0;display:grid;place-items:center;color:#ecfcff;border:1px solid #2e98b7;background:linear-gradient(145deg,#0d5b77aa,#033a52e0);box-shadow:inset 0 0 10px #54e7ff2a;border-radius:10px;padding:0}.gear svg{width:19px;height:19px}
.mast-info{position:relative;z-index:3;margin:10px 0 0 7px;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.online-pill{display:inline-flex;align-items:center;gap:8px;border:1px solid #4e8f87;border-radius:40px;background:#0b3c42c0;padding:5px 10px;color:#eaf6f7;font-size:11px;line-height:1;font-weight:750;letter-spacing:.1px;white-space:nowrap;box-shadow:inset 0 0 8px #15829a33}.orb{background:#8ba9b1;border-radius:50%;height:8px;width:8px;flex-shrink:0}.online-pill.online{color:#f0fff8;border-color:#28ec8e;background:linear-gradient(110deg,#046c49ee,#0b3d43e8);box-shadow:inset 0 0 14px #2cff9d38,0 0 10px #21f69a2a}.online-pill.online .orb{background:#32f08e;box-shadow:0 0 8px #2af18f}.online-pill.offline{border-color:#ff7d81;color:#ffd7d7}.online-pill.offline .orb{background:#ff7272}
.last-seen{font-size:11px;color:#e3eef5;text-shadow:0 1px 5px #000b}.last-seen:before{content:'◷';font-size:14px;margin-right:6px;vertical-align:-1px;color:#d1faff}
.app>main{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 1px 10px;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}.app>main::-webkit-scrollbar{display:none}
.info-banner{padding:8px 11px;border:1px solid #3198af;background:#06384a;border-radius:12px;margin:5px 0 10px;color:#caedf2;font-size:11px;line-height:1.4}.info-banner.hidden{display:none}
.page{display:none}.page.active{display:block}.panel{position:relative;overflow:hidden;border:1px solid #2bafc7;border-radius:15px;background:linear-gradient(115deg,#0a4f64e6 0%,#022c40fb 58%,#0a4257f2 100%);box-shadow:inset 0 1px 2px #b1f7ff45,inset 0 -7px 20px #006c8518,0 5px 15px #0008;margin-bottom:9px}.panel:before{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(ellipse 65% 55% at 18% 0%,#2ae4f32f,transparent 100%)}
.panel:after{content:'';position:absolute;pointer-events:none;bottom:-24px;right:-10px;width:82%;height:58px;border-radius:50%;border-top:1.5px solid #34d8e1a6;transform:rotate(-10deg);box-shadow:0 -10px 15px #21d8e81d,0 -24px 13px #1ed1ec0a}
.main-panel{padding:11px 11px 15px;border-color:#36d7e6;min-height:189px;background:linear-gradient(127deg,#0e5c72f0 0%,#05384bf5 40%,#0d4a5eef 100%);box-shadow:inset 0 1px 4px #95f7ff4f,0 0 10px #1bc9dc14;margin-top:1px}
.section-title,.small-title{display:flex;align-items:center;gap:9px;position:relative;z-index:2}.section-title svg{width:31px;height:31px;color:#7afffa;filter:drop-shadow(0 0 4px #1ae9ff75)}.section-title h2{font-size:clamp(19px,5.6vw,28px);font-weight:700;letter-spacing:-.5px;margin:0}.mini-status{display:none}
.main-stats{position:relative;z-index:2;display:grid;grid-template-columns:56% 44%;align-items:center;margin-top:9px;min-height:132px;background:linear-gradient(112deg,#05455bc9,#00273b6b 55%,transparent);border-radius:16px}
.stats-left{height:100%;padding:8px 7px 8px 1px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid #72e4ec52}.metric{display:flex;align-items:center;gap:8px}.metric-icon{color:#7ffffa;flex-shrink:0;width:28px;height:28px;margin-left:2px;stroke-width:1.9}.metric-body{min-width:0}.metric small{display:block;font-size:clamp(10px,3.3vw,15px);color:#deedf4;line-height:1.1;white-space:nowrap}.metric-number{display:flex;align-items:baseline;gap:5px;margin-top:5px;white-space:nowrap}.metric strong{font-size:clamp(24px,7.2vw,37px);font-weight:760;line-height:1;letter-spacing:-.6px}.metric span{font-weight:700;font-size:clamp(17px,4.8vw,26px)}.hairline{height:1px;background:#86b9c766;margin:13px 0 10px 6px}.current-hint{display:none}
.soc-wrap{display:grid;place-items:center}.soc-ring{--soc:0%;width:min(35vw,164px);height:min(35vw,164px);min-width:118px;min-height:118px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(from 0deg,#4af2df 0%,#24dbc7 var(--soc),#5f7987 var(--soc) 100%);filter:drop-shadow(0 0 8px #3ae6d133);box-shadow:inset 0 0 10px #62f5e13a}.soc-ring:before{content:'';position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 0deg,transparent 0%,#fff9 5%,transparent 12%,transparent 64%,#00e7fe75 65%,transparent 72%);mix-blend-mode:screen;opacity:.32}.soc-ring:after{content:'';position:absolute;inset:12px;border-radius:50%;background:radial-gradient(circle at 50% 80%,#00454e,#00263a 70%,#001726);box-shadow:inset 0 0 9px #00121c,0 0 0 1px #68eeef22}.soc-center{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;text-shadow:0 1px 9px #0affc535}.soc-center small{font-size:16px;color:#fff}.soc-text{display:flex;align-items:baseline}.soc-center strong{font-size:clamp(29px,9vw,48px);line-height:1.15}.soc-center .soc-text span{font-size:clamp(20px,6vw,35px);font-weight:750}.soc-icon{width:25px;height:25px;color:#00ebff;margin-top:1px;stroke-width:2.2}.panel-water{position:absolute;bottom:0;width:100%;height:18px;background:linear-gradient(90deg,transparent,#05edff29,transparent);pointer-events:none}
.batt-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:9px 0}.batt-tile{margin:0;min-height:78px;padding:9px 7px 8px 13px;background:linear-gradient(128deg,#0b5368ea,#032c42 82%)}.batt-tile:after{height:28px;bottom:-9px;right:-22px;width:75%;border-color:#4ad9e8b5;box-shadow:0 -7px 12px #26bfd928}.batt-tile:before{content:'';position:absolute;top:33%;left:5px;height:42%;width:4px;border-radius:4px;background:#2ce4cc;box-shadow:0 0 9px #27dbc0;inset:auto;transform:none}.batt-tile-top{position:relative;display:flex;align-items:flex-start;gap:11px;z-index:2}.batt-tile-top>svg{width:25px;height:25px;color:#84ffff;flex-shrink:0;stroke-width:2}.batt-tile-top>div{min-width:0}.batt-tile strong{font-size:clamp(12px,3.4vw,17px);display:block;line-height:1.08}.batt-tile small{display:block;font-size:clamp(10px,3.05vw,15px);color:#e0e9f1;margin-top:3px;line-height:1}.batt-value{display:flex;align-items:center;gap:7px;margin-top:5px;color:#f9fcff;font-size:clamp(18px,5.8vw,27px);font-weight:720;white-space:nowrap;letter-spacing:-.3px;line-height:1}.batt-value svg{width:19px;height:19px;stroke-width:2.2;color:#7bffff}
.lower-grid{display:grid;grid-template-columns:1.12fr .88fr;gap:8px}.small-panel{padding:9px 8px;min-height:133px}.small-title svg{width:24px;height:24px;color:#80fff8}.small-title h3{font-size:clamp(17px,4.8vw,23px);margin:0;font-weight:720;line-height:1}.env-grid{position:relative;z-index:2;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;margin-top:10px;border-radius:12px;background:#074a5d72;padding:5px 4px}.env-item{display:flex;align-items:center;gap:5px;min-width:0;padding:6px 2px}.env-item:nth-child(1),.env-item:nth-child(2){border-bottom:1px solid #94cce356}.env-item:nth-child(odd){border-right:1px solid #94cce356}.env-item svg{width:18px;height:21px;color:#8affff;flex-shrink:0}.env-item div{min-width:0}.env-grid small{display:block;font-size:clamp(8px,2.25vw,12px);color:#e2edf6;white-space:nowrap}.env-grid strong{display:block;margin-top:3px;font-size:clamp(11px,3.2vw,18px);white-space:nowrap;font-weight:700}
.bilge-panel{background:linear-gradient(125deg,#0a5a56,#034540 55%,#0a6754);border-color:#2ac7a1}.bilge-panel:after{border-color:#35e48f;box-shadow:0 -8px 15px #1fe08138}.bilge-state{position:relative;z-index:2;display:flex;align-items:center;gap:5px;margin-top:14px;padding:6px 0}.bilge-state svg{width:clamp(30px,9vw,52px);height:clamp(30px,9vw,52px);color:#b0f7d8;filter:drop-shadow(0 0 7px #39e39b52);flex-shrink:0}.bilge-state strong{font-size:clamp(10px,3.4vw,19px);color:#d8ffee;display:block;font-weight:750;line-height:1}.bilge-state small{display:block;color:#e7f8f1;margin-top:6px;font-size:clamp(9px,2.5vw,12px);line-height:1.25}.bilge-panel.safe{background:linear-gradient(124deg,#0b6f58,#095848 60%,#13885d);border-color:#31e48f;box-shadow:inset 0 0 20px #1ede7426,0 0 10px #21e77d22}.bilge-panel.safe .bilge-state svg,.bilge-panel.safe .bilge-state strong{color:#52ef98;filter:drop-shadow(0 0 7px #3de58a66)}.bilge-panel.alarm{border-color:#ff7070;background:linear-gradient(120deg,#692038,#431529)}.bilge-panel.alarm .bilge-state strong,.bilge-panel.alarm .bilge-state svg{color:#ffabab}
.alert-panel{padding:11px 12px;min-height:74px;cursor:pointer;background:linear-gradient(118deg,#0b546c,#032f43 65%,#0c5d67)}.alert-panel .small-title{gap:10px}.alert-panel .arrow{margin-left:auto;width:18px}.alarm-rows{position:relative;z-index:2;margin-top:9px;padding:5px 9px;border-top:1px solid #79d4e65e;background:#0844593b}.alarm-row{display:flex;gap:9px;align-items:center;min-height:29px;font-size:clamp(10px,3vw,13px);line-height:1.25;color:#ecfbff}.alarm-row svg{color:#65dce6;width:16px;height:16px;flex-shrink:0}
.tabbar{position:relative;flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:0;margin:2px 0 0;padding:3px 4px max(3px, calc(env(safe-area-inset-bottom,0px) - 22px));width:100%;border-radius:16px 16px 0 0;border:1px solid #217e98;border-bottom:0;background:linear-gradient(180deg,#073d53,#022334);box-shadow:inset 0 1px 2px #2ad7ea38,0 -8px 22px #000c;z-index:10}.tab{border:0;border-radius:12px;background:transparent;color:#e2f1f4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:45px;padding:4px 2px;font-size:clamp(10px,2.9vw,13px);position:relative}.tab:not(:last-child):after{content:'';position:absolute;right:0;top:10px;height:22px;width:1px;background:#53b5ca69}.tab svg{width:20px;height:20px}.tab.active{color:#fff;background:linear-gradient(150deg,#0d6277,#07455a);box-shadow:inset 0 -2px 0 #42e8d8,inset 0 0 13px #34dce95e,0 0 8px #20dbe216}.tab.active svg{color:#8af8ee;filter:drop-shadow(0 0 5px #4de8dd)}footer{display:none}
.page-head{padding:10px 6px}.page-head h2{font-size:24px;margin:0 0 5px}.page-head p{font-size:13px;color:#b5d7e6;margin:0}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-card{padding:16px}.detail-card svg{color:#8cffff}.detail-card small{display:block;font-size:11px;color:#b9d8e3;margin-top:6px}.detail-card h3{font-size:16px;margin:6px 0}.detail-card .big{font-size:25px;color:white}.note{padding:16px;font-size:12px;color:#d4ebf1;line-height:1.6;margin-top:10px}.note strong{font-size:14px;color:white}.note p{margin:7px 0}.history-panel{padding:24px 18px;text-align:center;line-height:1.65}.history-panel h3{font-size:18px;margin:6px 0}.history-panel p{font-size:13px;color:#c0dfeb}.history-icon{width:60px;height:60px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#074d62;color:#93ffff}.history-note{padding:10px;background:#00334a;border-radius:10px;font-size:12px;color:#abf4fb}
.modal-wrap{position:fixed;z-index:30;inset:0;display:grid;place-items:center;padding:calc(14px + env(safe-area-inset-top,0px)) 16px calc(14px + env(safe-area-inset-bottom,0px))}.modal-wrap.hidden{display:none}.modal-backdrop{position:absolute;inset:0;background:#000b;backdrop-filter:blur(6px)}.settings-card{position:relative;max-width:500px;width:100%;max-height:90%;overflow:auto;padding:22px;background:linear-gradient(150deg,#065772,#002037);border:1px solid #21c5d8;border-radius:22px;box-shadow:0 15px 70px #000b}.settings-head{display:flex;justify-content:space-between;align-items:start}.settings-head small{font-size:10px;letter-spacing:2px;color:#8bffff}.settings-head h2{margin:6px 0 18px}.settings-head button{background:#06415d;border:1px solid #2f94a5;color:white;border-radius:11px;width:36px;height:36px}#settings-form label{font-size:12px;color:#c1e3f0;display:block;margin-bottom:16px}#settings-form input[type=url],#settings-form input[type=password]{width:100%;margin-top:7px;border:1px solid #48a4b4;background:#001d2f;border-radius:10px;padding:12px;color:white;font-size:13px}.remember{display:flex!important;gap:10px;align-items:center}.remember input{accent-color:#32f5d9}.save,.disconnect{width:100%;padding:12px;border-radius:11px;font-weight:700}.save{background:#39ecdd;border:1px solid #94ffed;color:#002a39}.disconnect{margin-top:9px;background:#063c50;border:1px solid #3a8398;color:white}.settings-note{font-size:11px;color:#a9cedb;line-height:1.45}.settings-result{font-size:12px;color:#78ffe1}
@media (min-width:560px){.mast{min-height:145px}.mast-info{margin-top:16px}.main-panel{min-height:235px}.main-stats{min-height:172px}.batt-tile{min-height:94px}.small-panel{min-height:160px}.metric small{font-size:15px}.metric strong{font-size:40px}.metric span{font-size:24px}.soc-ring{width:174px;height:174px}.env-grid small{font-size:12px}.env-grid strong{font-size:19px}.bilge-state strong{font-size:19px}}
@media (max-width:360px){.mark{min-width:44px;width:44px}.brandtext h1{font-size:19px}.tagline{font-size:10px}.mast{min-height:calc(112px + env(safe-area-inset-top,0px))}.main-panel{min-height:173px}.main-stats{min-height:120px}.metric strong{font-size:24px}.metric span{font-size:16px}.soc-ring{min-width:107px;min-height:107px}.batt-tile{min-height:70px}.batt-tile-top{gap:6px}.small-panel{min-height:122px}.env-grid small{font-size:8px}.env-grid strong{font-size:11px}.bilge-state{gap:3px}.bilge-state svg{width:29px;height:29px}}

/* Marine Monitor v2.2.3 - blu oceano intenso, header compatto, navigazione slim */
:root {--aqua:#16caff;--mint:#3df5df;--green:#28f38a;--muted:#d1e5f3;background:#000d25}
body {background:radial-gradient(ellipse at 55% 0%,#064a91 0%,transparent 34%),linear-gradient(180deg,#001e4d 0%,#000c2b 60%,#001638 100%)}
.app {background:linear-gradient(180deg,#001b42 0%,#000e2b 60%,#00142b 100%)}
.mast {min-height:calc(93px + env(safe-area-inset-top,0px));background:linear-gradient(90deg,#00132eed 0%,#00346f8a 48%,transparent 100%),linear-gradient(165deg,#001a43,#02569b);padding-bottom:3px}
.mast-art {background:linear-gradient(90deg,#001535e6 0%,#00204d82 38%,transparent 82%),url('yacht.jpg') right 36% / auto 100% no-repeat;filter:saturate(1.7) contrast(1.25) brightness(.95)}
.mast:after {height:13px;background:linear-gradient(0deg,#00163a,transparent)}
.brandline {padding:0 2px}
.mark {width:45px;min-width:45px;color:#39dcff}
.brandtext h1 {font-size:clamp(20px,5.8vw,30px);letter-spacing:-.7px}
.tagline {font-size:clamp(9px,2.9vw,13px);margin-top:1px;color:#c3e0f5}
.gear {width:31px;height:31px;border-color:#3fbcf0;background:linear-gradient(140deg,#0075b7b0,#003e86b3)}
.mast-info {margin:7px 5px 0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.online-pill {padding:5px 7px;font-size:clamp(9px,2.65vw,11px);gap:5px;flex-shrink:0}
.last-seen {min-width:0;text-align:right;font-size:clamp(9px,2.5vw,11px);line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e5f3ff}
.last-seen:before {margin-right:4px;font-size:12px}
.panel {border-color:#139de2;background:linear-gradient(116deg,#074786f0 0%,#002755fc 51%,#064879fa 100%);box-shadow:inset 0 1px 2px #75d4ff65,inset 0 -5px 20px #003a821e,0 5px 15px #0009}
.panel:before {background:radial-gradient(ellipse 70% 55% at 18% 0%,#008cff38,transparent 100%)}
.panel:after {border-top-color:#05d5ffbd;box-shadow:0 -12px 16px #008cf82e,0 -22px 13px #0478fa13}
.main-panel {border-color:#1fd1ff;background:linear-gradient(125deg,#0763a2f7 0%,#002858fc 43%,#034f8cfc 100%);box-shadow:inset 0 1px 5px #61cfff80,0 0 12px #008cfa28}
.main-stats {background:linear-gradient(115deg,#004d92b3,#001d48ad 58%,transparent)}
.stats-left {border-right-color:#62c9fc66}
.metric-icon,.section-title svg,.small-title svg,.batt-tile-top>svg,.batt-value svg,.env-item svg {color:#43e4ff}
.soc-ring {background:conic-gradient(from 0deg,#46ffdd 0%,#03e2cf var(--soc),#34577e var(--soc) 100%);filter:drop-shadow(0 0 11px #00d8ff58)}
.soc-ring:after {background:radial-gradient(circle at 50% 85%,#005073,#001c41 70%,#00112d)}
.batt-tile {background:linear-gradient(135deg,#07558ef5,#002450 85%);border-color:#119de0}
.batt-tile:before {background:#0eeccf;box-shadow:0 0 12px #00eed3}
.batt-tile:after {border-color:#0bc9fb;box-shadow:0 -7px 14px #008bff4a}
.env-grid {background:#00527c75}
.env-item:nth-child(1),.env-item:nth-child(2) {border-bottom-color:#84caf16e}
.env-item:nth-child(odd) {border-right-color:#84caf16e}
/* Keep the luminous green reserved for an actually verified dry bilge. */
.bilge-panel {background:linear-gradient(125deg,#07575c,#003d49 55%,#086b52);border-color:#19cfa5}
.bilge-panel.safe {background:linear-gradient(120deg,#08744e,#026b48 58%,#008e4f);border-color:#37ff9e;box-shadow:inset 0 0 25px #1dff933f,0 0 16px #00ff8e40}
.bilge-panel.safe .bilge-state svg,.bilge-panel.safe .bilge-state strong {color:#43ff92;filter:drop-shadow(0 0 10px #2cff8cbb)}
.alert-panel {background:linear-gradient(118deg,#07568c,#002955 64%,#06658e)}
/* Compact, separately outlined controls; safe-area is OUTSIDE the menu. */
.tabbar {flex:none;position:relative;z-index:10;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;align-items:stretch;min-height:0;margin:3px 0 env(safe-area-inset-bottom,0px);padding:3px;border:1px solid #1379bb;border-radius:13px;background:linear-gradient(180deg,#034779,#002448);box-shadow:inset 0 1px 0 #2ebaf86b,0 -3px 12px #0009}
.tab {min-height:36px;padding:3px 1px 2px;gap:1px;border-radius:9px;border:1px solid #146a9b6e;background:linear-gradient(180deg,#06477780,#002a53a0);font-size:clamp(10px,2.65vw,12px);font-weight:600;line-height:1.05}
.tab svg {width:18px;height:18px;stroke-width:2}
.tab:not(:last-child):after {display:none}
.tab.active {border-color:#1bd7ed;color:#fff;background:linear-gradient(160deg,#0674a3,#034f82);box-shadow:inset 0 -2px 0 #22f1e1,inset 0 0 11px #12d7ff74}
.tab.active svg {color:#a0fffa;filter:drop-shadow(0 0 4px #29efff)}
.app>main {padding-bottom:7px}
@media (max-width:360px){.mast{min-height:calc(90px + env(safe-area-inset-top,0px))}.mast-info{gap:4px}.online-pill{padding:4px 5px;font-size:9px}.last-seen{font-size:9px}.mark{width:38px;min-width:38px}.brandtext h1{font-size:19px}}
@media (min-width:560px){.mast{min-height:145px}.mast-info{margin-top:13px}}

/* v2.2.5 — barra menu sul bordo fisico inferiore, senza fascia vuota. */
.app{padding-bottom:51px;}
.tabbar{
  position:fixed!important;
  bottom:0!important;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%);
  width:min(100%,560px)!important;
  margin:0!important;
  padding:2px 5px 0!important;
  border-radius:13px 13px 0 0!important;
  min-height:49px;
  z-index:20;
  box-sizing:border-box;
}
.tab{min-height:43px!important;padding:3px 2px!important;}
@supports (height: 100dvh) {
  .app {height:100dvh;}
}

/* v2.2.10: iOS standalone PWA - extend the dock below WebKit's reduced
   viewport, without stacking a second safe-area padding. */
.app { padding-bottom: 51px !important; }
.tabbar {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(8px - env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: min(calc(100% - 16px), 544px) !important;
  min-height: 47px !important;
  margin: 0 !important;
  padding: 3px !important;
  gap: 0 !important;
  border: 1px solid #1c7397 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg,#053657 0%,#001b37 100%) !important;
  box-shadow: inset 0 1px 0 #47c8ee55, 0 5px 22px #000a, 0 0 10px #008ae422 !important;
  z-index: 999 !important;
}
.tabbar .tab {
  min-height: 41px !important;
  padding: 4px 2px 3px !important;
  gap: 2px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #dfedf9 !important;
  font-weight: 550 !important;
  position: relative;
}
.tabbar .tab:not(:last-child)::after {
  display: block !important;
  content: '';
  position: absolute;
  top: 10px;
  right: 0;
  height: 23px;
  width: 1px;
  background: #2e8bb670;
}
.tabbar .tab svg {width: 20px !important; height: 20px !important;}
.tabbar .tab.active {
  color:#fff !important;
  background:linear-gradient(145deg,#0c7296 0%,#004361 100%) !important;
  box-shadow:inset 0 -2px 0 #37e5db, inset 0 0 14px #4ee9f267, 0 0 7px #1cd7ed25 !important;
  text-shadow:0 0 5px #bdfcff48;
}
.tabbar .tab.active:after {display:none !important;}
.tabbar .tab.active svg {color:#8cfbf1 !important;filter:drop-shadow(0 0 5px #46e2e5a0)}
/* Slightly shorter content clearance: the dock stays independent of scroll. */
.app>main{padding-bottom:8px !important;}


/* v2.2.10 — dock slightly raised, header and service bank slightly more compact */
.mast{min-height:calc(84px + env(safe-area-inset-top,0px)) !important;padding-bottom:2px !important;}
.mark{width:42px !important;min-width:42px !important;}
.brandtext h1{font-size:clamp(19px,5.6vw,28px) !important;}
.tagline{font-size:clamp(9px,2.8vw,12px) !important;}
.gear{width:29px !important;height:29px !important;}
.mast-info{margin:5px 5px 0 !important;gap:7px !important;}
.online-pill{padding:4px 7px !important;font-size:clamp(9px,2.55vw,10.5px) !important;}
.last-seen{font-size:clamp(9px,2.4vw,10.5px) !important;}
.main-panel{padding:9px 10px 12px !important;min-height:172px !important;}
.main-stats{margin-top:7px !important;min-height:118px !important;}
.metric-label{font-size:clamp(11px,3.1vw,15px) !important;}
.metric-value{font-size:clamp(22px,7vw,50px) !important;}
.soc-ring{width:min(33vw,154px) !important;height:min(33vw,154px) !important;min-width:108px !important;min-height:108px !important;}
.section-title h2{font-size:clamp(18px,5.2vw,26px) !important;}
.app{padding-bottom:50px !important;}
.tabbar{bottom:calc(18px - env(safe-area-inset-bottom,0px)) !important;}


/* v2.2.10 — dock raised a little more, palette darker blue */
:root{background:#00091b !important;}
body{background:radial-gradient(ellipse at 55% 0%,#033b78 0%,transparent 34%),linear-gradient(180deg,#00163c 0%,#000a22 60%,#001127 100%) !important;}
.app{background:linear-gradient(180deg,#001739 0%,#000a22 60%,#001022 100%) !important;}
.mast{background:linear-gradient(90deg,#00102ae8 0%,#002d6182 48%,transparent 100%),linear-gradient(165deg,#001538,#01467d) !important;}
.mast:after{background:linear-gradient(0deg,#00102a,transparent) !important;}
.panel{background:linear-gradient(116deg,#053c74f2 0%,#001f46fc 51%,#043b6afa 100%) !important;border-color:#1191d2 !important;}
.main-panel{background:linear-gradient(125deg,#05558df7 0%,#002147fc 43%,#033f73fc 100%) !important;border-color:#18c6f0 !important;}
.main-stats{background:linear-gradient(115deg,#003f7bb3,#00183aad 58%,transparent) !important;}
.batt-tile{background:linear-gradient(135deg,#04497af5,#001d40 85%) !important;border-color:#0f8ecb !important;}
.env-grid{background:#003f6175 !important;}
.alert-panel{background:linear-gradient(118deg,#054872,#002145 64%,#045571) !important;}
.tabbar{bottom:calc(26px - env(safe-area-inset-bottom,0px)) !important;background:linear-gradient(180deg,#032f4e 0%,#001429 100%) !important;border-color:#176b8f !important;box-shadow:inset 0 1px 0 #3ebae440,0 5px 22px #000b,0 0 10px #0069b61a !important;}
.tabbar .tab.active{background:linear-gradient(145deg,#085f7f 0%,#003753 100%) !important;}


/* v2.2.10 — stesso blu della v2.2.10, menu rialzato, pannelli Ambiente/Sentina più compatti */
.app { padding-bottom: 66px !important; }
.tabbar { bottom: calc(38px - env(safe-area-inset-bottom, 0px)) !important; }
.lower-grid .small-panel { min-height: 117px !important; padding: 7px 7px 6px !important; }
.lower-grid .small-title { gap: 6px !important; }
.lower-grid .small-title h3 { font-size: clamp(16px,4.5vw,22px) !important; }
.lower-grid .small-title svg { width: 21px !important; height: 21px !important; }
.env-grid { margin-top: 6px !important; padding: 2px 3px !important; }
.env-item { padding: 4px 2px !important; }
.bilge-state { margin-top: 9px !important; padding: 4px 0 !important; }
/* La regola generica .panel usa !important nella palette v2.2.10.
   Le varianti della sentina devono quindi prevalere esplicitamente. */
.panel.bilge-panel { background: linear-gradient(120deg,#064b43,#003d40 60%,#066753) !important; border-color: #1cb890 !important; }
.panel.bilge-panel.safe { background: linear-gradient(122deg,#075d40 0%,#076d47 58%,#078951 100%) !important; border-color: #31fc94 !important; box-shadow: inset 0 0 22px #1aff8b45,0 0 14px #00ee8735 !important; }
.panel.bilge-panel.safe .bilge-state strong,.panel.bilge-panel.safe .bilge-state svg {color:#43ff90 !important; filter:drop-shadow(0 0 7px #2cff8cb0) !important;}
.panel.bilge-panel.alarm { background: linear-gradient(125deg,#6b1323 0%,#901e30 57%,#521025 100%) !important; border-color:#ff5268 !important; box-shadow:inset 0 0 24px #ff33483d,0 0 13px #ef294837 !important; }
.panel.bilge-panel.alarm .bilge-state strong,.panel.bilge-panel.alarm .bilge-state svg { color:#ffb1b9 !important; filter:drop-shadow(0 0 7px #ff4c6b8c) !important; }
/* Lo stato sconosciuto non viene rappresentato come "asciutta". */

/* v2.2.10 — header only: 6 px less; all cards, colors and dock untouched. */
.mast { min-height: calc(78px + env(safe-area-inset-top,0px)) !important; }
@media (max-width:360px) { .mast { min-height: calc(78px + env(safe-area-inset-top,0px)) !important; } }
@media (min-width:560px) { .mast { min-height: 139px !important; } }

/* Marine Monitor v2.3 — smaller environment and bilge cards */
.lower-grid .small-panel {min-height:102px !important; padding:6px 7px 5px !important;}
.lower-grid .small-title h3{font-size:clamp(15px,4.2vw,20px) !important;}
.lower-grid .small-title svg{width:19px !important;height:19px !important;}
.env-grid{margin-top:4px !important;padding:1px 3px !important;}
.env-item{padding:3px 1px !important;gap:3px !important;}
.env-item svg{width:15px !important;height:17px !important;}
.env-grid strong{margin-top:1px !important;font-size:clamp(10px,3vw,17px) !important;}
.bilge-state{margin-top:5px !important;padding:2px 0 !important;gap:3px !important;}
.bilge-state svg{width:clamp(29px,8vw,44px) !important;height:clamp(29px,8vw,44px) !important;}
.bilge-state small{margin-top:3px !important;}

/* Preview charts and settings */
.history-panel{padding:14px 13px 12px !important;text-align:left !important;}
.history-panel h3{font-size:16px;margin:0 0 8px;}
.plot-title{display:flex;align-items:center;justify-content:space-between;color:#c4eafa;font-size:12px;}
.plot-title strong{font-size:19px;color:#eaffff;}
.plot{display:block;width:100%;height:132px;margin:8px 0 0;overflow:visible;}
.gridline{fill:none;stroke:#2a8abb50;stroke-width:1;}
.chart-line{fill:none;stroke:#48e7e8;stroke-width:3.5;stroke-linejoin:round;stroke-linecap:round;}
.chart-fill{fill:#17b9f02b;stroke:none;}
.chart-axis{display:flex;justify-content:space-between;color:#a9d2e6;font-size:10px;}
.preview-settings{display:grid;gap:10px;}
.preview-settings div{padding:11px;background:#053f5c;border:1px solid #176d95;border-radius:11px;display:flex;flex-direction:column;gap:3px;}
.preview-settings strong{font-size:12px;color:#e5f7fb;}.preview-settings span{font-size:12px;color:#acd5e3;}

/* v2.3.1 — solo Ambiente e Sentina leggermente più grandi */
.lower-grid .small-panel {min-height:114px !important;padding:8px 7px 7px !important;}
.lower-grid .small-title h3 {font-size:clamp(16px,4.4vw,21px) !important;}
.lower-grid .small-title svg {width:20px !important;height:20px !important;}
.env-grid {margin-top:6px !important;padding:3px 3px !important;}
.env-item {padding:4px 2px !important;gap:4px !important;}
.env-item svg {width:16px !important;height:18px !important;}
.env-grid strong {margin-top:2px !important;font-size:clamp(10px,3.1vw,17px) !important;}
.bilge-state {margin-top:8px !important;padding:4px 0 !important;gap:4px !important;}
.bilge-state svg {width:clamp(30px,8.5vw,47px) !important;height:clamp(30px,8.5vw,47px) !important;}
.bilge-state small {margin-top:5px !important;}

/* v2.3.2 — Ambiente e Sentina appena piu compatti */
.lower-grid .small-panel{min-height:110px !important;padding:7px 7px 6px !important;}
.env-grid{margin-top:5px !important;}
.bilge-state{margin-top:7px !important;}

/* v2.3.5 — riduzione di altri 2 px solo per Ambiente e Sentina */
.lower-grid .small-panel{min-height:108px !important;}

/* v2.3.5 — ulteriori 2 px in meno, solo Ambiente e Sentina */
.lower-grid .small-panel{min-height:106px !important;}

/* v2.3.5 — solo scheda Allarmi leggermente piu compatta */
.alert-panel{padding-top:9px !important;padding-bottom:9px !important;min-height:70px !important;}
.alarm-rows{margin-top:7px !important;padding-top:4px !important;padding-bottom:4px !important;}

/* v2.5: only the Storico screen changes; the approved Home styling stays untouched. */
.period-selector{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:2px 4px 10px;padding:4px;border-radius:12px;background:#001831;border:1px solid #147fb0}
.period-btn{min-height:37px;padding:7px 4px;border-radius:9px;background:linear-gradient(180deg,#043d69,#00264e);border:1px solid #166b9b;color:#d8eaff;font-size:13px;font-weight:650}
.period-btn.active{border-color:#45d7ef;color:#fff;background:linear-gradient(140deg,#076a9d,#064878);box-shadow:inset 0 -2px 0 #40e6d5,0 0 8px #1fdff32b}
.ah-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}
.ah-cell{padding:10px 5px;min-width:0;text-align:center;border:1px solid #167aaa;border-radius:10px;background:linear-gradient(150deg,#063a69,#001f43)}
.ah-cell small{display:block;font-size:10px;color:#c5ddec;min-height:26px;line-height:1.25}
.ah-cell strong{display:block;color:#e9ffff;font-size:clamp(14px,3.8vw,19px);margin-top:6px;white-space:nowrap}
.history-explain{font-size:11px!important;color:#c5d7e9!important;line-height:1.5;margin:7px 0 0}

/* v2.6: unicamente la schermata Allarmi; nessuna modifica alla Home */
#page-alerts .alert-panel,#page-alerts .test-panel{padding:13px 14px;}
#page-alerts .alarm-rows{margin-top:12px;}
#page-alerts .alarm-row{min-height:42px;padding:7px 3px;border-bottom:1px solid #4093b83d;align-items:flex-start;}
#page-alerts .alarm-row:last-child{border:0;}
#page-alerts .alarm-row.alert-critical{color:#ffbaba;}
#page-alerts .alarm-row.alert-test{color:#9cf2e7;}
#page-alerts .alarm-date{font-size:10px;color:#a3c3d4;display:block;margin-bottom:3px;}
#page-alerts .test-panel{background:linear-gradient(127deg,#033b70,#001b42 75%,#04345b);}
#page-alerts .test-panel p{position:relative;font-size:12px;line-height:1.55;color:#d9ebf5;margin:12px 0;}
#page-alerts .test-button{position:relative;z-index:1;width:100%;min-height:48px;border-radius:12px;border:1px solid #2fe9d7;background:linear-gradient(145deg,#087e9e,#034567);color:#f2ffff;font-weight:750;letter-spacing:.6px;box-shadow:inset 0 1px 0 #90ffff60;}
#page-alerts .test-button:disabled{opacity:.5;cursor:not-allowed;}
#page-alerts .alarm-help{font-size:11px;color:#b6dbe8;margin:8px 0 0;}

/* v2.7 — solo pannello Allarmi. Home e dimensioni approvate invariate. */
#page-alerts .alarm-toolbar{position:relative;z-index:2;display:flex;justify-content:flex-end;margin-top:8px;}
#page-alerts .alarm-clear{border:1px solid #e8aaa5;background:#622d3c;color:#fff2f1;border-radius:9px;font-size:12px;font-weight:650;padding:8px 12px;}
#page-alerts .alarm-clear:disabled,#page-alerts .alarm-delete:disabled{opacity:.45;cursor:not-allowed;}
#page-alerts .alarm-entry{flex:1;min-width:0;overflow-wrap:anywhere;}
#page-alerts .alarm-delete{flex-shrink:0;align-self:center;border:1px solid #a8cad8;border-radius:8px;background:#123e5c;color:#e6faff;font-size:11px;padding:7px 8px;}
#page-home #alert-summary{overflow-wrap:anywhere;}

/* Marine Monitor v2.8 — schermate approvate. Base grafica v2.7 preservata. */
.tabbar{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important}
.tab{font-size:clamp(9px,2.65vw,12px)!important;min-width:0!important}
.mm28-page-heading{padding:15px!important;margin:2px 0 14px!important}
.mm28-page-heading .small-title{align-items:center;gap:13px}.mm28-page-heading .small-title svg{width:30px;height:30px;color:#06dbff}
.mm28-page-heading h2{font-size:clamp(25px,7vw,34px);margin:0}
.mm28-page-heading p{position:relative;font-size:13px;color:#def0fb;margin:5px 0 0 43px}
.mm28-page-heading>small{position:relative;display:block;font-size:10px;color:#aec9dd;margin:6px 0 0 43px}
/* Home: 2 x 2 batterie, stesso allineamento Ambiente / Sentina */
#page-home .batt-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.mm28-cell{padding:11px 9px!important;min-width:0;min-height:80px;overflow:hidden}
.mm28-cell-title{position:relative;z-index:1;display:flex;align-items:center;gap:6px;min-width:0}
.mm28-cell-title svg{width:24px;height:24px;flex:none;color:#19f4f3}
.mm28-cell-title strong{font-size:clamp(11px,3vw,15px);line-height:1.15;min-width:0}
.mm28-cell-value,.mm28-cell-temp{position:relative;z-index:1;display:flex;gap:6px;align-items:center;margin:8px 0 0 25px}
.mm28-cell-value svg,.mm28-cell-temp svg{width:17px;height:17px;flex:none;color:#45e9fb}
.mm28-cell-value span{font-size:clamp(18px,5vw,27px);font-weight:750;white-space:nowrap}
.mm28-cell-temp{margin-top:5px}.mm28-cell-temp span{font-size:clamp(14px,3.8vw,20px);font-weight:650;white-space:nowrap}
.mm28-status-cell.unknown{border-color:#7b99aa!important}.mm28-status-cell.warning,.mm28-battery-state.warning{border-color:#ffd648!important;background:linear-gradient(115deg,#594718,#142b35)!important}
.mm28-status-cell.alarm,.mm28-battery-state.alarm{border-color:#ff5e6d!important;background:linear-gradient(115deg,#6b1533,#262b4c)!important}
.mm28-status-cell.safe,.mm28-battery-state.safe{border-color:#2de6a2!important;background:linear-gradient(115deg,#066357,#053a50)!important}
.mm28-status-text{position:relative;display:block;padding:10px 0 0 25px;font-size:clamp(11px,3.1vw,17px);color:#d5f8ed}
#page-home .mm28-env-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#page-home .mm28-env-row .small-panel{min-width:0;min-height:136px!important}
#page-home .mm28-env-row .small-title h3{font-size:clamp(13px,3.2vw,17px)!important;line-height:1.2}
.mm28-env-list{position:relative;z-index:1;margin-top:9px}
.mm28-env-list>div{display:flex;align-items:center;justify-content:space-between;gap:2px;border-top:1px solid #9ad9e04a;padding:7px 1px;font-size:clamp(9px,2.45vw,12px)}
.mm28-env-list strong{white-space:nowrap;font-size:clamp(10px,2.8vw,14px)}
#page-home .mm28-env-row .bilge-state{margin-top:14px!important}
#page-home .mm28-env-row .bilge-state strong{font-size:clamp(11px,3vw,16px)!important;overflow-wrap:anywhere}
/* Comandi: pulsanti dimostrativi non azionabili */
.mm28-switches{display:grid;gap:10px}
.mm28-switch-panel{display:flex;align-items:center;gap:13px;padding:17px 16px;min-height:94px}
.mm28-switch-panel>svg{position:relative;z-index:1;width:53px;height:53px;color:#6af2ff;flex:none}
.mm28-switch-panel h3{position:relative;z-index:1;flex:1;min-width:0;margin:0;font-size:clamp(16px,4.6vw,22px)}
.mm28-switch{position:relative;z-index:1;flex:none;width:58px;height:32px;border:2px solid #718ba6;border-radius:25px;background:#203b59;opacity:.75}
.mm28-switch:after{content:'';position:absolute;top:3px;left:4px;width:22px;height:22px;border-radius:50%;background:#e1f1f5}
.mm28-quick-panel{margin-top:14px;padding:13px}.mm28-quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:14px 0 10px;position:relative}
.mm28-quick-grid button{min-height:68px;border:1px solid #138ecb;border-radius:12px;background:#064376;color:#d6e8f1;font-weight:700;font-size:12px;opacity:.65}
.mm28-quick-panel small{position:relative;font-size:11px;color:#b9d4e5}
/* Batterie: 5 valori individuali + stato */
.mm28-battery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.mm28-battery-grid .mm28-cell{min-height:146px;padding:12px 9px!important}
.mm28-battery-grid .mm28-cell-title strong{font-size:clamp(11px,3vw,16px)}
.mm28-battery-grid .mm28-cell-value{margin-top:15px}.mm28-battery-grid .mm28-cell-value span{font-size:clamp(18px,5.1vw,28px)}
.mm28-battery-grid .mm28-cell-temp{margin-top:14px}.mm28-battery-grid .mm28-cell-temp span{font-size:clamp(16px,4.3vw,22px)}
.mm28-battery-state{padding:11px 10px!important;min-height:146px}
.mm28-state-main{position:relative;margin:20px 0 7px;font-size:clamp(13px,3.8vw,20px);font-weight:750}
.mm28-battery-state small{position:relative;color:#d0e7ea;font-size:10px;line-height:1.4}
/* Storico: il banco rimane collegato alle API già funzionanti */
.mm28-history-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:4px 0 12px}
.mm28-history-tab{min-width:0;min-height:60px;padding:8px 2px;border:1px solid #148abb;border-radius:10px;background:#04365d;color:#e4f4f9;font-size:clamp(9px,2.4vw,12px);font-weight:650;overflow-wrap:anywhere}
.mm28-history-tab.active{background:linear-gradient(135deg,#067d9d,#07527b);border-color:#34dbe9;box-shadow:inset 0 -3px 0 #00e5d9}
.mm28-extra-history{padding:17px 13px}.mm28-extra-history h3{position:relative;margin:0 0 11px}
.mm28-extra-history p{position:relative;font-size:11px;color:#bddaea;line-height:1.5}
.mm28-history-reading{position:relative;display:flex;justify-content:space-between;align-items:center;padding:11px 5px;border-bottom:1px solid #4c88aa66;font-size:13px}
.mm28-history-reading strong{font-size:17px;color:#e8ffff}
/* Allarmi: separazione reale dello storico dalle condizioni sensori non ancora verificate */
.mm28-alert-status{display:flex;gap:12px;align-items:center;padding:16px;margin-bottom:12px}
.mm28-alert-status>svg{position:relative;width:40px;height:40px;flex:none;color:#a9dce8}
.mm28-alert-status strong,.mm28-alert-status small{position:relative;display:block}
.mm28-alert-status strong{font-size:18px}.mm28-alert-status small{font-size:11px;color:#c1d8e4;margin-top:4px}
.mm28-alert-switch{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;border:1px solid #168abc;border-radius:12px;background:#001d3d;margin-bottom:13px}
.mm28-alert-switch button{border:0;border-radius:9px;padding:12px 3px;background:#063355;color:#c9eaf2;font-weight:700;font-size:12px}
.mm28-alert-switch button.active{background:linear-gradient(135deg,#0c8ba6,#05587b);color:#fff;box-shadow:inset 0 -3px 0 #36ebdc}
.mm28-active-placeholder{text-align:center;padding:26px 15px}.mm28-active-placeholder>svg{position:relative;width:44px;height:44px;color:#9cdbe5}
.mm28-active-placeholder h3,.mm28-active-placeholder p{position:relative}
.mm28-active-placeholder p{font-size:12px;line-height:1.5;color:#c8e0ee}
/* hidden has to override the display property of the newly introduced panels */
.hidden{display:none!important}


/* Marine Monitor v2.8.3 — solo spazi Home e intestazioni Comandi/Batterie.
   Nessuna modifica a dati, funzioni, API o barra di navigazione. */
#page-home .main-panel{margin-bottom:5px !important;}
#page-home .batt-grid{
  column-gap:7px !important;
  row-gap:5px !important;
  margin:5px 0 5px !important;
}
#page-home .batt-grid .mm28-cell{
  min-height:69px !important;
  padding:7px 8px 6px !important;
  margin-bottom:0 !important;
}
#page-home .batt-grid .mm28-cell-value{margin-top:5px !important;}
#page-home .batt-grid .mm28-status-text{padding-top:6px !important;}
#page-home .mm28-env-row{
  column-gap:7px !important;
  margin-bottom:5px !important;
}
#page-home .mm28-env-row .small-panel{
  min-height:108px !important;
  margin-bottom:0 !important;
  padding:6px 7px 5px !important;
}
#page-home .mm28-env-list{margin-top:4px !important;}
#page-home .mm28-env-list>div{padding:4px 1px !important;}
#page-home .mm28-env-row .bilge-state{margin-top:8px !important;}
#page-home .alert-panel{margin-top:0 !important;}
/* I titoli di pagina sono testo sullo sfondo, non pannelli/pulsanti. */
#page-commands .mm28-page-heading,
#page-batteries .mm28-page-heading{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:8px 5px 6px !important;
  margin:2px 0 9px !important;
  overflow:visible;
}
#page-commands .mm28-page-heading::before,
#page-commands .mm28-page-heading::after,
#page-batteries .mm28-page-heading::before,
#page-batteries .mm28-page-heading::after{display:none !important;content:none !important;}


/* Marine Monitor v2.8.4: Home con spazi intermedi; stati batteria/sentina coerenti. */
#page-home .main-panel{margin-bottom:8px !important;}
#page-home .batt-grid{
  column-gap:8px !important;
  row-gap:9px !important;
  margin:9px 0 10px !important;
}
#page-home .batt-grid .mm28-cell{
  min-height:80px !important;
  padding:10px 9px 9px !important;
}
#page-home .batt-grid .mm28-cell-value{margin-top:8px !important;}
#page-home .mm28-env-row{column-gap:8px !important;margin-bottom:9px !important;}
#page-home .mm28-env-row .small-panel{
  min-height:126px !important;
  padding:9px 8px 8px !important;
}
#page-home .mm28-env-list{margin-top:7px !important;}
#page-home .mm28-env-list>div{padding:6px 1px !important;}
#page-home .mm28-env-row .bilge-state{margin-top:12px !important;}
#page-home .alert-panel{margin-top:3px !important;}
/* Tre stati per ogni scheda di riepilogo: sconosciuto=giallo, sicuro=verde, allarme=rosso. */
#page-home .mm28-status-cell.unknown,
#page-batteries .mm28-battery-state.unknown,
#page-home .panel.bilge-panel.unknown{
  background:linear-gradient(122deg,#655017 0%,#4d3b14 55%,#443519 100%) !important;
  border-color:#ffd447 !important;
  box-shadow:inset 0 0 16px #fac84d22,0 0 10px #f1c64a18 !important;
}
#page-home .mm28-status-cell.warning,
#page-batteries .mm28-battery-state.warning{
  background:linear-gradient(122deg,#655017 0%,#4d3b14 55%,#443519 100%) !important;
  border-color:#ffd447 !important;
}
#page-home .mm28-status-cell.alarm,
#page-batteries .mm28-battery-state.alarm,
#page-home .panel.bilge-panel.alarm{
  background:linear-gradient(125deg,#6b1323 0%,#901e30 57%,#521025 100%) !important;
  border-color:#ff5268 !important;
}
#page-home .mm28-status-cell.safe,
#page-batteries .mm28-battery-state.safe,
#page-home .panel.bilge-panel.safe{
  background:linear-gradient(122deg,#075d40 0%,#076d47 58%,#078951 100%) !important;
  border-color:#31fc94 !important;
}
.mm284-status-line,.mm284-state-line{position:relative;z-index:2;display:flex;align-items:center;gap:7px;margin-top:10px;min-width:0}
.mm284-status-line>svg{height:27px;width:27px;flex:none}
.mm284-status-line .mm28-status-text{padding:0!important;font-size:clamp(10px,2.9vw,16px);line-height:1.15;overflow-wrap:anywhere}
.mm284-state-line{margin:15px 0 9px}
.mm284-state-line>svg{height:32px;width:32px;flex:none}
.mm284-state-line .mm28-state-main{margin:0!important;font-size:clamp(12px,3.4vw,19px)}
.mm28-status-cell.unknown .mm284-status-line,.mm28-battery-state.unknown .mm284-state-line,
.mm28-status-cell.warning .mm284-status-line,.mm28-battery-state.warning .mm284-state-line,
#page-home .bilge-panel.unknown .bilge-state svg,#page-home .bilge-panel.unknown .bilge-state strong{color:#ffe075!important;filter:none!important}
.mm28-status-cell.alarm .mm284-status-line,.mm28-battery-state.alarm .mm284-state-line{color:#ffb3bb!important}
.mm28-status-cell.safe .mm284-status-line,.mm28-battery-state.safe .mm284-state-line{color:#6dffac!important}
.mm284-battery-indicator{display:flex;align-items:center;flex:none;margin-left:auto}
.mm284-battery-indicator svg{width:18px;height:18px;flex:none}
.mm284-battery-indicator.unknown,.mm284-battery-indicator.warning{color:#ffe075}
.mm284-battery-indicator.alarm{color:#ff8694}
.mm284-battery-indicator.safe{color:#63f6a3}
.mm28-battery-grid .mm28-cell-title strong{flex:1;min-width:0}
/* Simboli sopra le tre azioni rapide; relè ancora fisicamente non collegati. */
.mm28-quick-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.mm28-quick-grid button svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.9;color:#67dfff}
.mm28-quick-grid button span{display:block}


/* v2.8.5 — Home: compromesso dimensionale tra v2.8.3 e v2.8.4.
   Evita che il riquadro Allarmi finisca sotto la barra inferiore. */
#page-home .main-panel{margin-bottom:6px !important;}
#page-home .batt-grid{column-gap:8px !important;row-gap:7px !important;margin:6px 0 7px !important;}
#page-home .batt-grid .mm28-cell{min-height:74px !important;padding:8px 9px 7px !important;}
#page-home .batt-grid .mm28-cell-value{margin-top:6px !important;}
#page-home .mm28-env-row{column-gap:8px !important;margin-bottom:7px !important;}
#page-home .mm28-env-row .small-panel{min-height:115px !important;padding:7px 8px 6px !important;}
#page-home .mm28-env-list{margin-top:5px !important;}
#page-home .mm28-env-list>div{padding:4px 1px !important;}
#page-home .mm28-env-row .bilge-state{margin-top:9px !important;}
#page-home .alert-panel{margin-top:1px !important;min-height:65px !important;padding:8px 11px !important;}
#page-home .alert-panel .alarm-rows{margin-top:5px !important;padding:3px 7px !important;}
/* Ulteriori piccoli adattamenti per i display meno alti; altri tab invariati. */
@media(max-height:760px){
 #page-home .main-panel{min-height:154px !important;padding-bottom:8px !important;}
 #page-home .batt-grid{row-gap:5px !important;margin:5px 0 !important;}
 #page-home .batt-grid .mm28-cell{min-height:68px !important;padding:6px 8px !important;}
 #page-home .mm28-env-row .small-panel{min-height:103px !important;}
 #page-home .mm28-env-list>div{padding:3px 1px !important;}
 #page-home .alert-panel{min-height:59px !important;}
}
/* Comandi: interazioni SOLO dimostrative, nessun invio a Cloudflare. */
#page-commands .mm28-switch{cursor:pointer;opacity:1;transition:background .18s,border-color .18s;}
#page-commands .mm28-switch.demo-on{background:#007e74;border-color:#48f4c5;box-shadow:0 0 11px #00eab233;}
#page-commands .mm28-switch.demo-on:after{transform:translateX(24px);background:#abffe5;}
#page-commands .mm28-switch:after{transition:transform .18s;}
#page-commands .mm28-quick-grid button{cursor:pointer;opacity:1;}
#page-commands .mm28-quick-grid button:active{background:#075c86;}
#page-commands .mm285-demo-feedback{position:relative;z-index:1;margin:0 0 10px;padding:7px 9px;border:1px solid #3abbcb78;border-radius:8px;background:#03243a;color:#d7f5fb;font-size:11px;line-height:1.3;}

/* v2.8.6 — Disable double-tap zoom without disabling pinch zoom.
   Applied to the app surface and controls; native multi-touch pinch remains available. */
html, body, .app, .app button, .app input, .app .panel, .app .tabbar {
  touch-action: manipulation;
}

/* Modest enlargement only when the viewport can accommodate it.
   Keep v2.8.5 compact rules on shorter phones so Allarmi stays visible. */
@media (min-height: 800px) {
  #page-home .batt-grid {row-gap: 9px !important; margin-top: 8px !important; margin-bottom: 9px !important;}
  #page-home .batt-grid .mm28-cell {min-height: 77px !important; padding-top: 9px !important; padding-bottom: 8px !important;}
  #page-home .mm28-env-row {margin-bottom: 9px !important;}
  #page-home .mm28-env-row .small-panel {min-height: 120px !important;}
}

/* v2.8.7: all tap targets, including inline SVG and text, avoid double-tap zoom.
   Two-finger pinch remains enabled. */
html,body,body * { touch-action: manipulation; }

/* v2.9.1 - conferma immediata comandi: stato in attesa */
#page-commands .mm28-switch.mm-pending{opacity:.75;border-color:#ffd06e;box-shadow:0 0 0 2px #ffc65d55,0 0 12px #ffb54844;}
#page-commands .mm28-switch.mm-pending:before{content:"";position:absolute;inset:-5px;border:2px solid #ffd06e;border-top-color:transparent;border-radius:30px;animation:mm291-spin 1s linear infinite;pointer-events:none;}
#page-commands .mm28-quick-grid button.mm-pending{opacity:.6;}
@keyframes mm291-spin{to{transform:rotate(360deg);}}

/* Marine Monitor 2.9.7 — impostazioni leggibili su smartphone */
.mm-settings{max-width:540px;max-height:calc(100dvh - 24px);padding:18px 15px;overflow-y:auto;overscroll-behavior:contain}.mm-settings-view.hidden{display:none!important}
.mm-settings-entry{width:100%;display:flex;align-items:center;gap:14px;min-height:84px;margin:9px 0;padding:13px 12px;background:linear-gradient(110deg,#0b4c7a,#002345);border:1px solid #3d93c4;border-radius:15px;color:white;text-align:left}
.mm-settings-entry svg{height:27px;width:27px;flex:none;color:#5de4ff}.mm-settings-entry svg:last-child{height:17px;width:17px;margin-left:auto}.mm-settings-entry span{flex:1}.mm-settings-entry strong{font-size:17px;display:block}.mm-settings-entry small{display:block;font-size:12px;margin-top:5px;color:#c5e4f5;line-height:1.4}
.mm-settings-back{border:0;background:transparent;color:#8aeaff;font-size:16px;min-height:48px;padding:8px 0;text-align:left}.mm-alarm-help{font-size:12px;color:#c0d9e7;line-height:1.5;margin:2px 0 12px}.mm-config-status{border:1px solid #3b86ad;border-radius:10px;padding:12px;font-size:13px;line-height:1.5;margin:0 0 12px;color:#d5f7ff;background:#062e4a}
.mm-alarm-group{margin:14px 0}.mm-alarm-group h3{font-size:14px;margin:0 0 8px;padding:10px 12px;border-radius:9px;background:#143b59;color:#ffb8b8}.mm-alarm-group h3.avviso{color:#ffe28b}
.mm-alarm-item{border:1px solid #357caa;background:#07304f;border-radius:12px;margin:8px 0;padding:12px}.mm-alarm-title{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:15px;font-weight:700;min-height:42px;line-height:1.35}.mm-alarm-title span{flex:1}.mm-alarm-title input{width:24px;height:24px;accent-color:#30e6a3;flex:none}.mm-alarm-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.mm-alarm-fields>label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#d2e9f8}.mm-number{display:flex;align-items:center;gap:6px}.mm-number input{min-width:0;width:100%;border:1px solid #499ab9;background:#001d31;color:#fff;border-radius:9px;padding:11px;font-size:17px;min-height:46px}.mm-number small{font-size:13px;min-width:18px}.mm-settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:20px}.mm-settings-actions button{min-height:51px;font-size:14px;padding:8px}.mm-secondary{border-radius:11px;border:1px solid #65a7cf;background:#073d5d;color:white}button:disabled{opacity:.5}
@media(max-width:380px){.mm-settings{padding:14px 11px}.mm-settings-entry strong{font-size:15px}.mm-alarm-title{font-size:14px}.mm-alarm-fields{gap:5px}}

/* v2.9.8: solo stato normale sentina, descrizione nascosta e titolo più visibile. */
#page-home .bilge-panel.safe .bilge-state strong {
  font-size:clamp(17px,4.7vw,24px) !important;
  line-height:1.15 !important;
  overflow-wrap:normal !important;
}
#page-home .bilge-panel.safe .bilge-state small { display:none !important; }

/* v2.9.9: attesa della prima lettura, neutra e non allarmante */
#page-home .panel.bilge-panel.loading {
 background:linear-gradient(120deg,#10384c,#0b3044 60%,#174458) !important;
 border-color:#52758a !important; box-shadow:none !important;
}
#page-home .panel.bilge-panel.loading .bilge-state strong,
#page-home .panel.bilge-panel.loading .bilge-state svg {color:#bdd5e3 !important;filter:none !important;}

/* v2.9.10: stato sentina a due sole condizioni; nessuna etichetta senza lettura valida */
#page-home .panel.bilge-panel.loading .bilge-state{visibility:hidden;}

/* Marine Monitor 2.9.11 — stato allarmi e ripristini comprensibili su mobile */
#page-alerts .mm-event-pill{display:inline-block;max-width:100%;width:max-content;margin:0 0 5px;padding:4px 9px;border-radius:50px;font-size:10px;font-weight:850;letter-spacing:.5px;background:#183e52;color:#c8effd;}
#page-alerts .alert-critical .mm-event-pill,.mm-live-alarm.critical .mm-event-pill{background:#692c35;color:#ffe2e4;}
#page-alerts .alert-warning .mm-event-pill,.mm-live-alarm.warning .mm-event-pill{background:#67501f;color:#ffedaf;}
#page-alerts .alert-restored .mm-event-pill{background:#134a43;color:#acf9d8;}
#page-alerts .alert-restored{color:#d5f6e7;border-left:3px solid #37c99a;padding-left:10px;}
#page-alerts .alarm-entry{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;overflow-wrap:anywhere;}
#page-alerts .alarm-date{font-size:11px;color:#b3d2df;}
.mm-live-alarm{display:flex;flex-direction:column;gap:6px;margin-bottom:9px;padding:14px 16px;}
.mm-live-alarm strong{font-size:16px;overflow-wrap:anywhere;}
.mm-live-alarm small{font-size:11px;color:#b3d2df;}
.mm-live-alarm.critical{border-left:4px solid #ff7676;}
.mm-live-alarm.warning{border-left:4px solid #eebc5e;}
.mm-no-active{padding:20px 14px;text-align:center;color:#bde6df;}
.mm28-alert-status.has-active{border-left:4px solid #eebc5e;}
.mm28-alert-status.has-critical{border-left:4px solid #ff7676;}

/* Monitor consumi e min/max — mobile first */
.mm-consumption-status {font-weight:700;padding:10px 0}
.mm-consumption-metrics{display:flex;flex-wrap:wrap;gap:10px 18px;margin:16px 0;font-size:.88rem}
.mm-consumption-metrics strong{font-variant-numeric:tabular-nums}
.mm-consumption-actions{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0 24px}
.mm-consumption-actions button{min-height:46px;border-radius:12px;padding:10px 16px;font-weight:700;cursor:pointer}
.mm-consumption-actions button:first-child{background:#147cb8;color:white;border:0}
.mm-session-archive{display:grid;gap:10px}
.mm-session-past,.mm-history-stat{border:1px solid var(--border,rgba(130,160,190,.25));border-radius:12px;padding:14px;margin:10px 0}
.mm-session-past{display:grid;gap:5px}
.mm-session-past small{opacity:.75}
.mm-stat-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.mm-stat-values span{display:grid;gap:4px;font-size:.75rem;min-width:0}
.mm-stat-values b{font-size:1rem;white-space:nowrap}
.mm-stat-values small{font-size:.69rem;opacity:.72}
.mm-history-stat .plot{width:100%;height:90px}
@media(max-width:380px){.mm-stat-values b{font-size:.86rem}}

.mm-bank-extremes{display:flex;gap:18px;margin:8px 0 14px}.mm-bank-extremes span{display:grid;gap:3px;font-size:.84rem}

/* v2.9.14: navigazione mobile essenziale e allarme ancora predisposto */
.tabbar {grid-template-columns:repeat(4,minmax(0,1fr))!important}
.mm-more-list{display:grid;gap:10px;padding:5px 0 16px}
.mm-more-link{width:100%;display:flex;align-items:center;gap:14px;min-height:78px;padding:14px 15px;color:#f2fbff;text-align:left;background:linear-gradient(135deg,#0a4b66,#022b44);border:1px solid #287b9c;border-radius:15px;box-shadow:inset 0 1px 0 #74d6ea33;cursor:pointer}
.mm-more-link>svg:first-child{width:29px;height:29px;flex:none;color:#72ebe2}
.mm-more-link>svg:last-child{width:19px;height:19px;flex:none;color:#add6e5;margin-left:auto}
.mm-more-link span{display:grid;gap:5px;min-width:0}.mm-more-link strong{font-size:17px}.mm-more-link small{font-size:12px;color:#b4d0df;line-height:1.35}
.mm-subhead{display:flex;align-items:center;gap:12px;min-height:56px}.mm-subhead>button{border:1px solid #346e87;border-radius:11px;background:#073b54;color:#fff;font-size:28px;width:42px;height:42px}.mm-subhead h2{font-size:23px;flex:1;margin:0}.mm-soon{font-size:12px;color:#dce5e9;border:1px solid #54788a;border-radius:20px;padding:5px 9px}
.mm-map-frame{height:clamp(260px,46vh,430px);border-radius:17px;border:1px solid #378aa0;overflow:hidden;position:relative;background:radial-gradient(ellipse at 40% 30%,#135970,#062e46 64%,#021b31 100%);display:flex;flex-direction:column;align-items:center;justify-content:center}
.mm-map-frame:before{content:'';position:absolute;inset:0;background-image:linear-gradient(#57bcbb17 1px,transparent 1px),linear-gradient(90deg,#57bcbb17 1px,transparent 1px);background-size:24px 24px;pointer-events:none}
.mm-map-heading{position:absolute;top:14px;left:15px;font-size:11px;letter-spacing:1.4px;color:#a1dae4}
.mm-anchor-disk{width:min(58vw,205px);height:min(58vw,205px)}.mm-map-message{position:relative;text-align:center;color:#fff;font-weight:700;line-height:1.4;font-size:14px;padding:0 22px}.mm-map-message small{display:block;font-size:11px;font-weight:400;color:#bdd5df;margin-top:5px}
.mm-anchor-control{padding:18px 16px}.mm-anchor-setting{display:flex;justify-content:space-between;gap:10px;font-size:16px}.mm-anchor-control input{width:100%;margin-top:18px;accent-color:#42e4d8}.mm-anchor-scale{display:flex;justify-content:space-between;color:#b6d6df;font-size:12px}.mm-anchor-control p,.mm-anchor-caution{color:#afcad5;font-size:12px;line-height:1.5}.mm-anchor-disabled{display:block;width:100%;margin-top:12px;min-height:49px;border:1px solid #476b80;border-radius:12px;background:#1b4155;color:#bbccd5;opacity:.8;cursor:not-allowed}
.mm-diagnostics{padding:18px}.mm-diagnostics h3{margin:0 0 14px}.mm-diagnostics p{font-size:13px;line-height:1.55}

/* v2.9.16 — uniforma menu e allarme ancora alla palette originale Marine Monitor */
.mm-more-link{
 background:linear-gradient(115deg,#0a4f64e6 0%,#022c40fb 58%,#0a4257f2 100%);
 border-color:#2bafc7;
 box-shadow:inset 0 1px 2px #b1f7ff45,inset 0 -7px 20px #006c8518,0 5px 15px #0008;
}
.mm-more-link>svg:first-child{color:#80fff8}
.mm-more-link>svg:last-child{color:#a9dce7}
.mm-more-link:active{background:linear-gradient(115deg,#0d6174,#064159)}
.mm-subhead>button{background:linear-gradient(145deg,#0a4f64,#022c40);border-color:#2bafc7}
.mm-map-frame{background:radial-gradient(ellipse at 40% 30%,#0d5265,#032c40 64%,#001b2b 100%);border-color:#2bafc7}
.mm-anchor-control input{accent-color:var(--aqua)}
.mm-anchor-disabled{background:#073b4e;border-color:#287c91}

/* v2.9.17 — headings and menu EXACTLY aligned with existing Comandi and .panel styling */
#page-more .mm28-page-heading,
#page-history .mm28-page-heading,
#page-alerts .mm28-page-heading,
#page-anchor .mm28-page-heading {
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:8px 5px 6px !important;
  margin:2px 0 9px !important;
  overflow:visible !important;
}
#page-more .mm28-page-heading::before,
#page-more .mm28-page-heading::after,
#page-history .mm28-page-heading::before,
#page-history .mm28-page-heading::after,
#page-alerts .mm28-page-heading::before,
#page-alerts .mm28-page-heading::after,
#page-anchor .mm28-page-heading::before,
#page-anchor .mm28-page-heading::after { display:none !important;content:none !important; }
/* Menu entries use the same exact background, border, glow and shadow as the other cards. */
#page-more .mm-more-link {
 background:linear-gradient(115deg,#0a4f64e6 0%,#022c40fb 58%,#0a4257f2 100%) !important;
 border:1px solid #2bafc7 !important;
 box-shadow:inset 0 1px 2px #b1f7ff45,inset 0 -7px 20px #006c8518,0 5px 15px #0008 !important;
 color:#f6fdff !important;
 position:relative;overflow:hidden;
}
#page-more .mm-more-link::before{
 content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;
 background:radial-gradient(ellipse 65% 55% at 18% 0%,#2ae4f32f,transparent 100%);
}
#page-more .mm-more-link > * {position:relative;z-index:1;}
#page-more .mm-more-link > svg:first-child{color:#43e4ff !important;}
#page-more .mm-more-link > svg:last-child{color:#c5dde6 !important;}
#page-more .mm-more-link small {color:#c5dde6 !important;}
/* Match existing heading approach for the anchor page too: plain title, no surrounding card. */
#page-anchor .mm-subhead{padding:8px 5px 6px;margin:2px 0 9px;}

/* v2.9.18: Menu identico alla palette blu oceano dei pannelli della app */
#page-more .mm-more-link {
 background:linear-gradient(116deg,#053c74f2 0%,#001f46fc 51%,#043b6afa 100%) !important;
 border:1px solid #1191d2 !important;
 box-shadow:inset 0 1px 2px #b1f7ff45,inset 0 -7px 20px #006c8518,0 5px 15px #0008 !important;
}
#page-more .mm-more-link::before {background:radial-gradient(ellipse 65% 55% at 18% 0%,#2ae4f32f,transparent 100%);}
.mm-session-delete {justify-self:start;margin-top:8px;border:1px solid #c66b75;background:transparent;color:#ffccd0;border-radius:10px;min-height:40px;padding:8px 13px;font-size:13px;font-weight:650;cursor:pointer;}
.mm-session-delete:disabled{opacity:.45;cursor:wait;}

/* GPS demonstration: keep same Marine Monitor ocean theme */
.mm-demo-banner{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;padding:11px 13px;border:1px solid #267b97;border-radius:12px;background:#082b40;color:#c6eafa;font-size:12px}
.mm-demo-banner strong{color:#6fe5dc}.mm-demo-banner span{font-size:11px}
.mm-gps-map-frame{display:block;height:clamp(320px,49vh,480px);background:#092f42}
.mm-gps-map-frame:before{display:none}
#mm-gps-map{height:100%;width:100%;z-index:0}
.mm-gps-map-error{position:absolute;inset:0;z-index:5;background:#062637;color:white;display:grid;place-items:center;padding:20px;text-align:center}
.mm-gps-map-error[hidden]{display:none}
.mm-gps-status{border:1px solid #278b90;border-radius:10px;margin-top:14px;padding:12px;background:#073649;color:#70e7dc;font-weight:700}
.mm-gps-status.outside{color:#ffb1a5;border-color:#bf6160;background:#4d242e}
.mm-gps-reset{width:100%;border:1px solid #2b8ba6;background:#0b4259;border-radius:11px;color:#eaf8ff;padding:12px;margin-top:9px;min-height:44px;font-weight:700}
.mm-gps-pin{width:30px;height:30px;display:grid;place-items:center;background:#09394b;border:2px solid #59e6d8;border-radius:50%;color:#fff;box-shadow:0 2px 12px #0009;font-size:19px}
.mm-gps-pin.boat{background:#13597c;border-color:white}
.mm-gps-map-frame .leaflet-control-attribution{font-size:9px}
.mm-gps-map-frame .leaflet-control-attribution a{color:#125975}

/* Il renderer SVG di Leaflet usa dimensioni proprie: non ereditare lo stile delle icone. */
#mm-gps-map .leaflet-overlay-pane svg {max-width:none!important;max-height:none!important}

/* v2.9.23 — Allarme ancora: palette blu oceano identica ai pannelli Comandi. */
#page-anchor .mm-demo-banner,
#page-anchor .mm-gps-status,
#page-anchor .mm-anchor-disabled {
  background:linear-gradient(116deg,#053c74f2 0%,#001f46fc 51%,#043b6afa 100%) !important;
  border:1px solid #1191d2 !important;
  color:#e6f5ff !important;
  box-shadow:inset 0 1px 2px #75d4ff45 !important;
}
#page-anchor .mm-demo-banner strong {color:#43c7ff !important;}
#page-anchor .mm-gps-status.outside{background:linear-gradient(116deg,#582137,#32172d) !important;border-color:#f07080 !important;color:#ffcad0 !important;}
#page-anchor .mm-map-frame {border-color:#1191d2 !important;background:#001f46 !important;}
#page-anchor .mm-subhead>button{background:linear-gradient(116deg,#053c74,#001f46 51%,#043b6a) !important;border-color:#1191d2 !important;}
#page-anchor .mm-anchor-control input{accent-color:#149bff !important;}
#page-anchor .mm-gps-pin{background:#073a72;border-color:#43c7ff;}
#page-anchor .mm-gps-pin.boat{background:#134a84;border-color:#e6f5ff;}

/* v2.9.23 - assi numerici, lettura punti e test comunicazioni */
.plot{touch-action:pan-y;cursor:crosshair}
.mm-plot-label{font-size:10px;fill:#bfd9e9;stroke:none}
.mm-plot-unit{font-size:10px;font-weight:700;fill:#9fd9f1;stroke:none}
.mm-plot-tooltip-text{font-size:10px;font-weight:600;fill:#ffffff;stroke:none}
.mm-plot-tip{pointer-events:none}
.mm-test-box{padding:15px 12px;margin:12px 0;border:1px solid #3d93c4;border-radius:13px;background:linear-gradient(110deg,#0b4c7a,#002345);color:#f1faff;display:grid;gap:10px}
.mm-test-box strong{font-size:16px}
.mm-test-box small{font-size:12px;color:#bbd9ed;line-height:1.5}
.mm-test-result{font-size:13px;line-height:1.5;color:#d7efff;margin:0}
.mm-test-btn{border:1px solid #68b6de;border-radius:10px;background:#07334f;color:#fff;padding:12px;min-height:48px;font-size:15px;font-weight:600}

/* v2.9.24: impedisce la selezione accidentale durante i tocchi.
   Input, campi editabili e risultati copiabili mantengono la selezione. */
body, .page, .panel, .tabbar, .mm-more-list, .mm-history-stat, .plot, button {
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
}
input, textarea, select, [contenteditable="true"], .mm-copyable {
  -webkit-user-select:text; user-select:text; -webkit-touch-callout:default;
}
.plot, .plot * { -webkit-user-select:none; user-select:none; }

/* v2.9.25: intervallo storico personalizzato */
.mm-custom-history{padding:11px 13px!important;margin:0 0 10px!important;background:linear-gradient(112deg,#073c6b,#002143)!important;border:1px solid #247bb3!important;border-radius:12px!important}
.mm-custom-history-toggle{width:100%;min-height:37px;border:0;background:transparent;color:#e7f5ff;text-align:left;font-size:13px;font-weight:650;display:flex;align-items:center;justify-content:space-between;padding:5px 1px}
.mm-custom-history-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.mm-custom-history-grid label{font-size:12px;color:#c4e2f1;display:flex;flex-direction:column;gap:7px;min-width:0}
.mm-custom-history-grid input{width:100%;min-width:0;box-sizing:border-box;background:#021b37;border:1px solid #478bb5;color:#fff;border-radius:9px;padding:9px 5px;font-size:13px;min-height:45px;color-scheme:dark}
.mm-custom-history-apply{margin-top:12px;width:100%;min-height:44px;border:1px solid #52bcf2;background:linear-gradient(112deg,#076d9d,#06446e);color:#fff;border-radius:9px;font-weight:650;font-size:14px}
#mm-custom-history-status{color:#b8d9eb;font-size:11px;line-height:1.5;margin:10px 1px 1px}
.mm-history-range-caption{color:#bed5e7;font-size:11px;margin:2px 4px 9px}


/* v2.9.27 - palette blu oceano per pagine di configurazione e navigazione.
   IMPORTANTE: gli indicatori stato Home/Sentina/Batterie e i loro colori
   sono intenzionalmente esclusi: stessi CSS della v2.9.25. */
#settings-modal .settings-card {
  background:linear-gradient(145deg,#06467e 0%,#001d43 60%,#032e5b 100%) !important;
  border-color:#238fd0 !important;
  box-shadow:inset 0 1px 2px #70bfff40,0 15px 70px #000b !important;
}
#settings-modal .settings-head small {color:#92d8ff !important;}
#settings-modal .settings-head button {
  background:linear-gradient(145deg,#075487,#002a56) !important;
  border-color:#368fc3 !important;
}
#settings-modal .mm-settings-entry,
#settings-modal .mm-test-box {
  background:linear-gradient(116deg,#084d86 0%,#00234e 62%,#04386b 100%) !important;
  border-color:#298dcb !important;
  box-shadow:inset 0 1px 1px #7bd3ff35 !important;
}
#settings-modal .mm-settings-entry svg {color:#74cbff !important;}
#settings-modal .mm-settings-back {color:#8ed7ff !important;}
#settings-modal .mm-config-status {
  background:#052d58 !important;border-color:#347eb8 !important;
}
#settings-modal .mm-alarm-group h3 {background:#133858 !important;}
#settings-modal .mm-alarm-item {background:#062b50 !important;border-color:#357fb8 !important;}
#settings-modal .mm-alarm-title input,
#settings-modal #remember-key {accent-color:#229bea !important;}
#settings-modal .mm-number input,
#settings-modal #settings-form input[type=url],
#settings-modal #settings-form input[type=password] {
  background:#001a3a !important;border-color:#3c8cc1 !important;
}
#settings-modal .save {
  background:linear-gradient(125deg,#188fda,#0965af) !important;
  border-color:#79c8ff !important;color:#fff !important;
}
#settings-modal .disconnect,
#settings-modal .mm-secondary,
#settings-modal .mm-test-btn {
  background:linear-gradient(125deg,#064679,#00274d) !important;
  border-color:#3b91c7 !important;
  color:#f0f8ff !important;
}
#settings-modal .settings-result {color:#a9dcff !important;}
/* Schede di navigazione secondaria senza residui verde petrolio. */
#page-more .mm-more-link:active {background:linear-gradient(115deg,#07518a,#002c56) !important;}
#page-more .mm-more-link::before {background:radial-gradient(ellipse 65% 55% at 18% 0%,#218cf02b,transparent 100%) !important;}
#page-more .mm-subhead>button {background:linear-gradient(145deg,#07548a,#002c57) !important;border-color:#248ac9 !important;}
#page-anchor .mm-demo-banner {background:#062b54 !important;border-color:#2182ba !important;}
#page-anchor .mm-gps-map-error {background:#07284d !important;}
#page-anchor .mm-gps-reset {background:#073d75 !important;border-color:#2c8ec9 !important;}

/* Marine Monitor v2.9.28 — consumi e storico eventi, palette blu oceano. */
.mm-measurement-source,.mm-continuous-placeholder{display:grid;gap:5px;background:linear-gradient(120deg,#073e70,#00254d 75%,#053a6a);border:1px solid #3687c4;border-radius:13px;padding:13px 15px;margin:12px 0;color:#dbeeff}
.mm-measurement-source strong,.mm-continuous-placeholder strong{color:#fff;font-size:14px}
.mm-measurement-source small,.mm-continuous-placeholder span{font-size:12px;line-height:1.5;color:#bad9f1}
.mm-source-label{font-size:10px;letter-spacing:.1em;font-weight:800;color:#84cfff}
.mm-event-statistics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:10px 0}
.mm-event-statistics span{display:grid;justify-items:center;gap:4px;padding:9px 3px;background:#062b56;border:1px solid #2b6699;border-radius:9px;font-size:10px;color:#b3d7f3;text-align:center}
.mm-event-statistics strong{color:#fff;font-size:18px;font-variant-numeric:tabular-nums}
.mm-event-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;overflow:visible;margin:10px 0 12px;padding-bottom:3px;min-width:0}
.mm-event-filters button{min-width:0;width:100%;border:1px solid #367bb0;border-radius:999px;background:#04294e;color:#c2e3f8;font-size:clamp(9px,2.5vw,11px);font-weight:650;line-height:1.2;min-height:32px;padding:6px 2px;white-space:normal;overflow-wrap:normal;cursor:pointer}
.mm-event-filters button.active{background:linear-gradient(125deg,#1279bc,#094c90);border-color:#7cc6fa;color:white}
#page-alerts .alarm-row{gap:8px;padding:12px 2px;min-height:58px}
#page-alerts .alarm-entry{display:grid;gap:5px;line-height:1.4;min-width:0}
#page-alerts .alarm-date{font-size:11px;color:#a9cce5}
@media(max-width:370px){.mm-event-statistics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v2.9.33 - presentazione compatta contatori Ah, palette blu oceano */
.mm-ah-summary-title{margin:14px 0 9px;font-size:14px;font-weight:700;color:var(--text, #d8eaf7)}
#mm-continuous-note{font-size:12px;margin:8px 0 14px}

/* v2.9.35 — disposizione compatta della pagina Batterie (nessuna modifica alla Home) */
#page-batteries .mm28-battery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#page-batteries .mm28-battery-grid .mm28-cell{min-height:110px!important;padding:9px 9px!important}
#page-batteries .mm28-battery-grid .mm28-cell-value{margin-top:8px}
#page-batteries .mm28-battery-grid .mm28-cell-temp{margin-top:6px}
#page-batteries .mm28-battery-grid .mm28-cell-value span{font-size:clamp(17px,4.6vw,25px)}
#page-batteries .mm28-battery-grid .mm28-cell-temp span{font-size:clamp(14px,3.5vw,19px)}
#page-batteries .mm35-service{grid-column:1/-1;min-height:100px!important;background:inherit;border-color:inherit}
#page-batteries .mm35-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:12px;position:relative;z-index:1}
#page-batteries .mm35-values>div{min-width:0;display:flex;flex-direction:column;gap:4px}
#page-batteries .mm35-values small{font-size:10px;color:#b9d6ea;white-space:nowrap}
#page-batteries .mm35-values strong{font-size:clamp(13px,3.7vw,20px);white-space:nowrap;font-weight:750;font-variant-numeric:tabular-nums}
#page-batteries .mm28-battery-state{min-height:110px!important;padding:9px 10px!important}
#page-batteries .mm28-battery-state .mm284-state-line{margin:7px 0 5px}
#page-batteries .mm28-battery-state .mm284-state-line>svg{width:25px;height:25px}
#page-batteries .mm28-battery-state small{font-size:9px;line-height:1.25}
@media(max-width:370px){
 #page-batteries .mm35-values{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:7px;margin-top:8px}
 #page-batteries .mm35-service{min-height:110px!important}
 #page-batteries .mm35-values strong{font-size:16px}
}


/* v2.9.36 — cinque voci nella barra inferiore, con Batterie dedicata */
.tabbar{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important}
.tabbar .tab{min-width:0!important;padding:3px 0!important;font-size:clamp(9px,2.45vw,12px)!important;white-space:nowrap}
.tabbar .tab svg{width:19px!important;height:19px!important}
@media(max-width:355px){.tabbar .tab{font-size:9px!important}.tabbar .tab svg{width:18px!important;height:18px!important}}

/* v2.9.36 — maggiore leggibilità della sola pagina Batterie, altezza contenuta */
#page-batteries .mm28-page-heading h2{font-size:clamp(19px,5vw,24px)}
#page-batteries .mm28-page-heading p{font-size:clamp(12px,3.2vw,14px)}
#page-batteries .mm28-page-heading small{font-size:clamp(11px,2.9vw,13px)}
#page-batteries .mm28-battery-grid .mm28-cell-title strong,
#page-batteries .mm28-battery-grid .mm28-battery-state .mm28-cell-title strong{font-size:clamp(12px,3.25vw,16px)!important;line-height:1.16}
#page-batteries .mm28-battery-grid .mm28-cell-value span{font-size:clamp(19px,5.1vw,27px)!important}
#page-batteries .mm28-battery-grid .mm28-cell-temp span{font-size:clamp(16px,4.0vw,21px)!important}
#page-batteries .mm35-values small{font-size:clamp(11px,2.85vw,13px)!important}
#page-batteries .mm35-values strong{font-size:clamp(14px,3.9vw,21px)!important}
#page-batteries .mm28-battery-state .mm284-state-line .mm28-state-main{font-size:clamp(13px,3.65vw,19px)!important}
#page-batteries .mm28-battery-state small{font-size:clamp(10px,2.65vw,12px)!important;line-height:1.2}
#page-batteries .mm28-battery-grid .mm28-cell{min-height:112px!important}
#page-batteries .mm35-service{min-height:103px!important}
#page-batteries .mm28-battery-state{min-height:112px!important}
@media(max-width:370px){
 #page-batteries .mm35-values{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;margin-top:9px!important}
 #page-batteries .mm35-values small{font-size:10px!important;letter-spacing:-.2px}
 #page-batteries .mm35-values strong{font-size:clamp(12px,3.45vw,14px)!important}
}


/* v2.9.37 — Batteria servizi: due colonne, valori sovrapposti e più leggibili */
#page-batteries .mm35-service{min-height:150px!important;padding:12px 13px!important}
#page-batteries .mm35-service .mm37-values{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;margin-top:12px!important}
#page-batteries .mm35-service .mm37-column{display:flex;flex-direction:column;gap:12px;min-width:0}
#page-batteries .mm35-service .mm37-value{display:flex;flex-direction:column;gap:3px;min-width:0}
#page-batteries .mm35-service .mm37-value small{font-size:clamp(11px,3vw,13px)!important;line-height:1.2;white-space:normal}
#page-batteries .mm35-service .mm37-value strong{font-size:clamp(17px,4.7vw,23px)!important;line-height:1.1;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:370px){
 #page-batteries .mm35-service .mm37-values{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin-top:10px!important}
 #page-batteries .mm35-service .mm37-column{gap:10px}
 #page-batteries .mm35-service .mm37-value small{font-size:11px!important}
 #page-batteries .mm35-service .mm37-value strong{font-size:clamp(16px,4.5vw,20px)!important}
}

/* v2.9.38 — contenuti Batterie servizi centrati sulle due colonne superiori */
#page-batteries .mm35-service .mm37-values{column-gap:8px!important;}
#page-batteries .mm35-service .mm37-column{align-items:center;text-align:center;}
#page-batteries .mm35-service .mm37-value{align-items:center;text-align:center;width:100%;}
#page-batteries .mm35-service .mm37-value small,
#page-batteries .mm35-service .mm37-value strong{text-align:center;}

/* v2.9.41 — pagina e comandi del Marine Air Conditioner Tuya */
.mm-ac-page{display:none;gap:14px}
.mm-ac-page.active{display:flex;flex-direction:column}
.mm-ac-page .mm-subhead{display:flex;align-items:center;gap:10px;min-width:0}
.mm-ac-page .mm-subhead h2{flex:1;min-width:0;font-size:clamp(19px,5vw,25px)}
.mm-ac-state{font-size:12px;color:#aabbd0;background:rgba(255,255,255,.06);padding:6px 9px;border-radius:20px;white-space:nowrap}
.mm-ac-main{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:22px!important}
.mm-ac-current{display:flex;flex-direction:column;gap:5px}
.mm-ac-current>small,.mm-ac-set small{color:#9cacc0;font-size:13px}
.mm-ac-current>div{display:flex;align-items:flex-start;gap:5px;line-height:1}
.mm-ac-current>div strong{font-size:clamp(54px,15vw,76px);font-variant-numeric:tabular-nums;letter-spacing:-3px}
.mm-ac-current>div span{font-size:23px;color:#9cacc0;margin-top:8px}
.mm-ac-current #ac-updated{font-size:11px;line-height:1.3}
.mm-ac-power{border:1px solid rgba(247,193,56,.35);background:rgba(247,193,56,.1);color:#f5c440;border-radius:18px;padding:13px 15px;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:90px;font-weight:700}
.mm-ac-power-dot{width:22px;height:22px;border:2px solid currentColor;border-radius:50%;position:relative}
.mm-ac-power-dot:before{content:"";position:absolute;width:2px;height:10px;background:currentColor;top:-5px;left:8px}
.mm-ac-power.on{background:rgba(63,191,150,.12);color:#58d5ae;border-color:rgba(63,191,150,.4)}
.mm-ac-power:disabled{opacity:.5}
.mm-ac-set{display:flex;align-items:center;justify-content:space-between;padding:16px 18px!important}
.mm-ac-set>div:first-child{display:flex;flex-direction:column;gap:5px}
.mm-ac-set>div:first-child strong{font-size:30px;font-variant-numeric:tabular-nums}
.mm-ac-step{display:flex;gap:9px}
.mm-ac-step button{width:45px;height:45px;border-radius:14px;border:1px solid rgba(112,166,204,.25);background:rgba(255,255,255,.05);color:#d7e8f8;font-size:28px;line-height:1}
.mm-ac-step button:disabled{opacity:.4}
.mm-ac-options{padding:16px!important}
.mm-ac-options h3{margin:0 0 12px;font-size:15px;color:#aebed0}
.mm-ac-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.mm-ac-grid button{min-height:45px;padding:7px 4px;border-radius:12px;border:1px solid rgba(112,166,204,.2);background:rgba(255,255,255,.035);color:#b9c8d8;font-size:12px;font-weight:650;line-height:1.15}
.mm-ac-grid button.selected{border-color:#f5c440;background:rgba(245,196,64,.12);color:#f5c440}
.mm-ac-lock{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px!important}
.mm-ac-lock>span{display:flex;flex-direction:column;gap:4px}
.mm-ac-lock strong{font-size:14px}
.mm-ac-lock small{font-size:11px;color:#91a4b9;line-height:1.3}
#ac-lock{flex:none}
.mm-ac-message,.mm-ac-fault{margin:0;padding:0 3px;color:#9cacc0;font-size:12px;line-height:1.45}
.mm-ac-fault:not(:empty){padding:11px 13px;border:1px solid rgba(255,113,98,.35);border-radius:12px;color:#ff9e91;background:rgba(255,90,80,.08)}
@media(max-width:360px){.mm-ac-main{padding:17px!important}.mm-ac-power{min-width:78px;padding:11px 10px}.mm-ac-grid{gap:6px}.mm-ac-grid button{font-size:11px}}


/* v2.9.39 — Batteria servizi impostata per dati tecnici/BMS */
#page-batteries .mm39-service{grid-column:1/-1;min-height:166px!important;padding:12px 13px!important;background:inherit;border-color:inherit}
#page-batteries .mm39-service .mm39-main{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px;margin-bottom:10px}
#page-batteries .mm39-service .mm39-main-item{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-width:0}
#page-batteries .mm39-service .mm39-main-item small{font-size:12px!important;line-height:1.2;white-space:normal}
#page-batteries .mm39-service .mm39-main-item strong{font-size:clamp(18px,4.9vw,24px)!important;line-height:1.08;white-space:nowrap;font-variant-numeric:tabular-nums}
#page-batteries .mm39-service .mm39-extra{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
#page-batteries .mm39-service .mm39-extra-item{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px solid rgba(92,157,201,.26);border-radius:12px;background:rgba(255,255,255,.03);padding:8px 6px;min-width:0}
#page-batteries .mm39-service .mm39-extra-item small{font-size:11px!important;line-height:1.15;white-space:normal}
#page-batteries .mm39-service .mm39-extra-item strong{font-size:clamp(13px,3.8vw,16px)!important;line-height:1.12;white-space:nowrap;font-variant-numeric:tabular-nums}
#page-batteries .mm39-service .mm39-extra-item.mm39-wide{grid-column:1/-1}
@media(max-width:370px){
 #page-batteries .mm39-service{min-height:160px!important;padding:11px 12px!important}
 #page-batteries .mm39-service .mm39-main{gap:8px;margin-top:9px;margin-bottom:9px}
 #page-batteries .mm39-service .mm39-main-item small{font-size:11px!important}
 #page-batteries .mm39-service .mm39-main-item strong{font-size:clamp(17px,4.6vw,21px)!important}
 #page-batteries .mm39-service .mm39-extra{gap:7px 8px}
 #page-batteries .mm39-service .mm39-extra-item{padding:7px 5px}
 #page-batteries .mm39-service .mm39-extra-item small{font-size:10.5px!important}
 #page-batteries .mm39-service .mm39-extra-item strong{font-size:clamp(12px,3.5vw,15px)!important}
}


/* v2.9.46 — Celle e dati tecnici Vatrer; aspetto coerente con v2.9.45 */
#page-batteries .mm46-service{min-height:0!important}
#page-batteries .mm46-service .mm39-main{margin:9px 0 10px}
#page-batteries .mm46-cells{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-bottom:9px}
#page-batteries .mm46-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;border:1px solid rgba(92,157,201,.28);border-radius:9px;padding:6px 2px;background:rgba(255,255,255,.025)}
#page-batteries .mm46-cell small{font-size:10px;line-height:1.1;opacity:.75}
#page-batteries .mm46-cell strong{font-size:clamp(12px,3.4vw,15px);line-height:1.2;letter-spacing:-.25px;font-variant-numeric:tabular-nums}
#page-batteries .mm46-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 12px}
#page-batteries .mm46-metrics>div{display:flex;align-items:baseline;justify-content:space-between;gap:6px;min-width:0;border-bottom:1px solid rgba(92,157,201,.18);padding:3px 0}
#page-batteries .mm46-metrics small,#page-batteries .mm46-protections small{font-size:clamp(10px,2.6vw,12px);line-height:1.2;opacity:.75}
#page-batteries .mm46-metrics strong,#page-batteries .mm46-protections strong{font-size:clamp(12px,3.2vw,15px);font-variant-numeric:tabular-nums;white-space:nowrap}
#page-batteries .mm46-protections{margin-top:8px;padding-top:7px;border-top:1px solid rgba(92,157,201,.30);display:flex;justify-content:space-between;align-items:center;gap:8px}
#page-batteries .mm46-protections .mm46-ok{color:#6ee1b9}
@media(max-width:355px){#page-batteries .mm46-metrics{column-gap:7px}#page-batteries .mm46-metrics>div{flex-direction:column;gap:1px}#page-batteries .mm46-cell{padding:5px 1px}}

/* Stima autonomia Vatrer: aggiunta senza alterare il layout dei controlli. */
.mm-bms-remaining{position:relative;z-index:2;margin:8px 10px 3px;font-size:13px;color:#dceef5;font-variant-numeric:tabular-nums}
