@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--navy:#142b49;--blue:#2764d8;--blue2:#eaf1ff;--ink:#18263a;--muted:#78869a;--line:#e7ecf3;--bg:#f5f7fb;--white:#fff;--green:#16865d;--amber:#b87510;--red:#c63f4f;--shadow:0 8px 30px rgba(28,47,78,.045)}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:14px 'DM Sans',sans-serif;color:var(--ink)}h1,h2,h3,b,strong{font-family:Manrope,'DM Sans',sans-serif}a{color:inherit;text-decoration:none}button,input,select{font:inherit}.app-shell{min-height:100vh;display:flex}.sidebar{width:248px;background:var(--navy);color:#dbe5f5;display:flex;flex-direction:column;padding:24px 15px;position:fixed;inset:0 auto 0 0;z-index:5}.brand{display:flex;align-items:center;gap:11px;padding:3px 10px 31px;color:#fff}.brand b{display:block;font-size:17px;letter-spacing:1.6px}.brand small{display:block;font-size:10px;color:#a8bdd9;margin-top:4px}.brand-mark{width:48px;height:48px;border-radius:15px;background:linear-gradient(145deg,#4386ff,#2554c9);color:#fff;display:grid;place-items:center;font:800 24px Manrope;box-shadow:0 8px 20px #1e4da55c}.brand-mark.small{width:37px;height:37px;border-radius:11px;font-size:19px}.nav-label,.eyebrow{font-size:10px;letter-spacing:1.65px;font-weight:700;color:#8ea7c9}.nav-label{padding:0 13px 12px}.nav-link{height:45px;display:flex;align-items:center;gap:13px;padding:0 13px;margin:3px 0;border-radius:10px;color:#c1d0e4;font-weight:600;transition:.18s}.nav-link:hover{background:#ffffff0d;color:#fff}.nav-link.active{background:#2b62b9;color:#fff;box-shadow:inset 3px 0 #79aaff}.nav-icon{font-size:18px;width:19px;text-align:center}.sidebar-foot{margin-top:auto;border-top:1px solid #ffffff20;padding:18px 10px 0;color:#dbe5f5;font-size:12px}.sidebar-foot small{display:block;color:#8ea7c9;margin:7px 0 0 16px}.status-dot{display:inline-block;width:7px;height:7px;background:#47d9a1;border-radius:50%;margin-right:8px;box-shadow:0 0 0 4px #47d9a11c}.main{margin-left:248px;width:calc(100% - 248px);padding:0 34px 24px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:30px 0 25px}.topbar .eyebrow{color:#8b98aa}.topbar h1{font-size:25px;letter-spacing:-.7px;margin:7px 0 0;font-weight:800}.user-menu{display:flex;align-items:center;gap:10px;white-space:nowrap}.user-menu b{font-size:12px;display:block}.user-menu small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.avatar{width:37px;height:37px;display:grid;place-items:center;border-radius:50%;background:#e4ecff;color:#2a5dc2;font-weight:800}.logout{font-size:11px;color:#526681;margin-left:12px}.welcome-card{min-height:183px;background:linear-gradient(110deg,#1a3558,#234c83 72%,#2c5e9c);border-radius:17px;padding:28px 32px;color:white;display:flex;justify-content:space-between;align-items:center;overflow:hidden;position:relative;box-shadow:var(--shadow)}.welcome-card .pill{display:inline-block;background:#ffffff20;color:#c8ddff;border:1px solid #ffffff24;border-radius:30px;padding:5px 10px;font-size:9px;font-weight:700;letter-spacing:1.2px}.welcome-card h2{font:800 23px Manrope;margin:13px 0 8px;letter-spacing:-.6px}.welcome-card p{margin:0;color:#d0dff4;font-size:12px}.welcome-art{width:170px;height:140px;position:relative;flex-shrink:0}.orbit{position:absolute;border:1px solid #ffffff25;border-radius:50%;width:145px;height:145px;left:15px;top:-2px}.orbit-b{width:110px;height:110px;left:32px;top:15px;border-style:dashed}.pulse-core{position:absolute;left:62px;top:46px;width:52px;height:52px;display:grid;place-items:center;border-radius:17px;background:#ffffff18;border:1px solid #ffffff50;font:800 24px Manrope;box-shadow:0 0 0 12px #ffffff0b}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:20px 0}.stat-card,.panel{background:white;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.stat-card{padding:19px 20px;position:relative;min-height:139px}.stat-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;font-size:16px;float:right}.stat-icon.blue{background:#eaf1ff;color:#2764d8}.stat-icon.green{background:#e4f8ef;color:#16865d}.stat-icon.amber{background:#fff3dd;color:#b87510}.stat-icon.violet{background:#f0eaff;color:#7952c9}.stat-label{font-size:12px;color:#718096;font-weight:600;display:block;margin-top:4px}.stat-card strong{display:block;font-size:29px;letter-spacing:-1px;margin:12px 0 3px}.stat-card small{font-size:10px;color:#99a4b4}.panel{padding:22px 22px;margin-bottom:20px;min-width:0}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}.panel-head h2{font-size:16px;margin:0;letter-spacing:-.25px}.panel-head p{font-size:11px;color:var(--muted);margin:6px 0 0}.btn{border:0;border-radius:8px;padding:11px 15px;display:inline-flex;align-items:center;justify-content:center;gap:12px;font-weight:700;font-size:12px;cursor:pointer}.btn.primary{background:var(--blue);color:white;box-shadow:0 5px 12px #2764d822}.btn.primary:hover{background:#1d52b9}.btn.secondary{background:#edf1f7;color:#34465d}.btn.wide{width:100%}.table-wrap{overflow:auto;width:100%}table{border-collapse:collapse;width:100%;min-width:570px;text-align:left}th{font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:#8a97a8;font-weight:700;padding:12px 14px;background:#f8faff;border-top:1px solid #edf1f6;border-bottom:1px solid #edf1f6}td{padding:15px 14px;border-bottom:1px solid #eff2f7;font-size:12px;color:#4a5a70}tbody tr:last-child td{border-bottom:0}td b{display:block;color:#24344b;font-size:12px}.cell-sub{display:block;font-size:10px;color:#98a3b3;margin-top:5px}.model-chip{font-size:10px;padding:5px 7px;background:#f0f4fb;color:#546782;border-radius:5px;font-weight:700}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:20px;padding:5px 8px;font-size:10px;font-weight:700;white-space:nowrap}.badge i{width:5px;height:5px;border-radius:50%;background:currentColor}.badge.good{background:#e6f8ef;color:#16865d}.muted-badge{background:#edf0f5;color:#69788c}.footnote{font-size:10px;line-height:1.6;color:#96a1b0;margin:15px 0 0}.empty{text-align:center;padding:32px!important;color:#8a97a8}.split-layout{display:grid;grid-template-columns:minmax(280px,.78fr) minmax(0,1.5fr);gap:20px;align-items:start}.form-panel .panel-head{margin-bottom:21px}.stack{display:flex;flex-direction:column;gap:14px}.stack label{display:flex;flex-direction:column;gap:7px;color:#526177;font-size:11px;font-weight:700}.stack input,.stack select{width:100%;height:40px;border:1px solid #dfe6f0;border-radius:8px;padding:0 11px;background:#fff;color:#24344b;outline:none;font-size:12px}.stack input:focus,.stack select:focus{border-color:#6794ee;box-shadow:0 0 0 3px #2764d815}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:11px}.actions{white-space:nowrap}.actions a,.link-button,.text-link{font-size:11px;color:#2764d8;font-weight:700}.actions form{display:inline;margin-left:8px}.link-button{border:0;background:none;padding:0;cursor:pointer}.text-link{white-space:nowrap}.alert{border-radius:9px;padding:12px 14px;font-size:12px;margin:0 0 16px}.alert.danger{background:#fff0f0;color:#a62d3b;border:1px solid #ffd5d9}.alert.success{background:#eaf9f0;color:#17774e;border:1px solid #c9f0da}.empty-state{text-align:center;padding:45px 20px;max-width:660px;margin:auto}.empty-icon{width:55px;height:55px;margin:0 auto 16px;border-radius:16px;background:#eaf1ff;color:#2764d8;display:grid;place-items:center;font-size:27px}.empty-state h2{font-size:19px}.empty-state p{font-size:12px;line-height:1.8;color:#748196}.profile-card{display:flex;gap:18px;align-items:center;max-width:650px}.avatar.large{width:65px;height:65px;font-size:22px}.profile-card h2{margin:0 0 6px}.profile-card p{margin:6px 0}.footer{display:flex;justify-content:space-between;gap:12px;color:#a0aaba;font-size:10px;padding:4px 2px 15px}.login-page{min-height:100vh;background:radial-gradient(ellipse at 20% 0%,#e6edff,transparent 50%),#f5f7fb;display:grid;place-items:center;padding:24px}.login-wrap{background:#fff;border:1px solid #e6ebf3;box-shadow:0 20px 70px #1c2f4e12;border-radius:20px;width:min(100%,420px);padding:38px}.login-wrap .brand-mark{margin-bottom:25px}.login-wrap .eyebrow{color:#8090a7}.login-wrap h1{font-size:25px;margin:8px 0}.login-wrap>.muted{font-size:12px;margin:0 0 25px}.login-wrap .stack{margin-top:24px}.small{font-size:10px;line-height:1.6;margin-top:18px}.muted{color:var(--muted)}
@media(max-width:1100px){.main{padding:0 22px 20px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.split-layout{grid-template-columns:1fr}.sidebar{width:220px}.main{margin-left:220px;width:calc(100% - 220px)}}@media(max-width:720px){.sidebar{position:relative;width:100%;inset:auto;padding:13px;display:block}.app-shell{display:block}.brand{padding:3px 7px 12px}.brand small{display:none}.nav-label,.sidebar-foot{display:none}.sidebar nav{display:flex;overflow:auto;gap:5px}.nav-link{min-width:max-content;height:38px;margin:0;padding:0 10px;font-size:11px}.nav-icon{font-size:14px}.main{margin:0;width:100%;padding:0 13px 18px}.topbar{padding:19px 2px;align-items:flex-start}.topbar h1{font-size:20px}.user-menu{gap:7px}.user-menu>div:nth-child(2){display:none}.logout{margin-left:2px}.welcome-card{padding:22px;min-height:160px}.welcome-card h2{font-size:19px;max-width:300px}.welcome-art{position:absolute;right:-65px;opacity:.5}.stats-grid{gap:10px;margin:13px 0}.stat-card{padding:15px;min-height:122px}.stat-card strong{font-size:25px}.stat-icon{width:28px;height:28px}.panel{padding:16px 13px}.panel-head{align-items:flex-start}.panel-head h2{font-size:14px}.panel-head .btn{padding:9px;font-size:10px}.footer{flex-direction:column}.two-col{grid-template-columns:1fr 1fr}.login-wrap{padding:29px 23px}}@media(max-width:390px){.stats-grid{grid-template-columns:1fr 1fr}.stat-card{padding:12px}.stat-label{font-size:10px}.welcome-card h2{font-size:17px}.two-col{grid-template-columns:1fr}}

/* Distinct role-based workspaces: administrator console vs customer portal */
.admin-workspace .sidebar{background:#101d36;border-right:3px solid #3268c7}
.admin-workspace .brand-mark{background:#2857a4}
.admin-workspace .nav-label{color:#8ea9d7}
.admin-workspace .nav-link.active{background:#23467c;color:#fff;border-left:3px solid #7fb3ff}
.admin-workspace .sidebar-foot{border-top-color:#2b3c5a}
.user-workspace .sidebar{background:#123c3a;border-right:3px solid #21a69a}
.user-workspace .brand-mark{background:#167d76}
.user-workspace .nav-label{color:#9ed8d2}
.user-workspace .nav-link.active{background:#1b5d58;color:#fff;border-left:3px solid #7be1d5}
.user-workspace .sidebar-foot{border-top-color:#2b5e5a}
@media(max-width:760px){.admin-workspace .sidebar,.user-workspace .sidebar{border-right:0;border-bottom:3px solid #3268c7}}

.reading-chip{display:inline-flex;gap:5px;align-items:center;padding:5px 8px;margin:2px;border-radius:8px;background:#edf4ff;color:#1c3e70;font-size:12px;white-space:nowrap}
.user-workspace .reading-chip{background:#e5f7f4;color:#17675f}
.badge.warn{background:#fff4d6;color:#8b5d00}
.badge.warn i{background:#d99b20}

.model-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;padding:16px}
.model-card{border:1px solid var(--border,#e1e7ef);border-radius:14px;overflow:hidden;background:var(--surface,#fff);min-width:0}
.model-photo{width:100%;height:155px;object-fit:contain;background:#f3f6fa;display:block}
.model-placeholder{display:flex;align-items:center;justify-content:center;font-size:42px;color:#7b8ba5}
.model-card-body{padding:14px;display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.model-card-body h3{margin:0;font-size:16px}
.command-preview{font-size:12px;color:#65748b;white-space:pre-wrap;overflow-wrap:anywhere;max-height:70px;overflow:hidden;margin:0}
.model-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.model-actions form{margin:0}
.model-photo-preview{display:flex;align-items:center;gap:12px;font-size:12px;color:#65748b}
.model-photo-preview img{width:90px;height:70px;object-fit:contain;border:1px solid #dce3ed;border-radius:8px;background:#f4f7fb}

/* Listing search, filters, and sortable headers */
.listing-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid var(--border,#e1e7ef)}
.listing-search,.listing-filter{min-height:38px;border:1px solid #d8e1ed;border-radius:9px;background:#fff;padding:8px 12px;color:#24344d;font:inherit}
.listing-search{flex:1;min-width:180px}
.listing-filter{min-width:130px}
.listing-count{font-size:12px;color:#708098;white-space:nowrap}
.sortable-header{cursor:pointer;user-select:none;white-space:nowrap}
.sortable-header:after{content:' ↕';font-size:11px;color:#8b9ab0}
.sortable-header.sort-asc:after{content:' ↑';color:#2563eb}
.sortable-header.sort-desc:after{content:' ↓';color:#2563eb}
tr[hidden]{display:none!important}
/* Customer dashboard analog meters */
.gauge-section{margin-bottom:20px}
.live-indicator{display:inline-flex;align-items:center;gap:7px;color:#16806c;font-size:12px;font-weight:600}
.live-indicator i{width:8px;height:8px;background:#21b58a;border-radius:50%;display:inline-block;box-shadow:0 0 0 4px #e0f7ef}
.gauge-device{padding:18px 0;border-top:1px solid #e8edf4}
.gauge-device:first-of-type{border-top:0}
.gauge-device-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.gauge-device-heading h3{margin:0;font-size:16px;color:#20324c}
.gauge-device-heading p{margin:5px 0 0;color:#7b899e;font-size:12px}
.gauge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.gauge-card{border:1px solid #e0e8f1;border-radius:15px;padding:15px 12px 13px;background:linear-gradient(180deg,#fff,#f8fbff);text-align:center;min-width:0}
.gauge-title{font-weight:700;font-size:13px;color:#445570;margin-bottom:8px;text-transform:uppercase;letter-spacing:.04em}
.analog-meter{height:105px;position:relative;overflow:hidden;margin:0 auto;width:180px;max-width:100%}
.meter-face{position:absolute;left:10px;right:10px;top:4px;height:170px;border-radius:50%;border:10px solid transparent;background:conic-gradient(from 270deg at 50% 50%,#18a779 0deg,#7dcf83 55deg,#f4c65c 115deg,#e95b5b 180deg,transparent 180deg) border-box;clip-path:inset(0 0 48% 0);transform:rotate(0deg)}
.meter-face:before{content:'';position:absolute;inset:8px;border-radius:50%;background:#fff;clip-path:inset(0 0 48% 0)}
.meter-needle{position:absolute;z-index:2;left:calc(50% - 2px);top:calc(100% - 14px);height:69px;width:4px;border-radius:4px;background:#263e60;transform-origin:50% calc(100% - 1px);transform:rotate(var(--meter-angle));box-shadow:0 1px 3px #a8b4c5}
.meter-hub{position:absolute;z-index:3;left:calc(50% - 7px);top:calc(100% - 20px);width:14px;height:14px;border-radius:50%;background:#243b5a;border:3px solid #dbe5f0}
.meter-min,.meter-max{position:absolute;z-index:4;top:73px;font-size:10px;color:#66758b}
.meter-min{left:6px}.meter-max{right:6px}
.gauge-digital{font-size:28px;font-weight:750;line-height:1.2;letter-spacing:-.04em;color:#152d4d;font-variant-numeric:tabular-nums;margin-top:2px}
.gauge-digital small{font-size:12px;font-weight:600;letter-spacing:0;color:#64748b}
.gauge-scale{font-size:10px;color:#91a0b4;margin-top:6px}
@media(max-width:600px){.listing-toolbar{padding:10px}.listing-search{flex-basis:100%}.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gauge-card{padding:12px 6px}.analog-meter{width:150px}.gauge-digital{font-size:23px}}

/* MAEMOS reference dashboard refresh — deep mine-blue shell */
:root{--navy:#073451;--blue:#0868cf;--bg:#eaf0f5;--ink:#102847;--muted:#6f8299;--line:#dce6ef;--shadow:0 4px 18px rgba(14,43,73,.06)}
body{font-family:Arial,Helvetica,sans-serif;background:#eaf0f5;color:#102847}
.app-shell{display:block;min-height:100vh;padding-top:92px}
.topbar{position:fixed;z-index:20;top:0;left:0;right:0;height:92px;padding:10px 28px;background:linear-gradient(105deg,#06314f,#073a5a 65%,#062e4b);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 3px 14px #061e3333}
.top-brand{display:flex;align-items:center;gap:12px;min-width:310px;color:white}
.top-brand img{width:76px;height:64px;object-fit:contain;filter:drop-shadow(0 2px 2px #001d35)}
.top-brand b{display:block;font-size:32px;line-height:1;letter-spacing:.5px;font-weight:800}
.top-brand small{display:block;color:#e1edf7;font-size:15px;margin-top:5px;white-space:nowrap}
.page-heading{display:none}.old-user-menu{display:none}
.mine-context{display:flex;align-items:center;gap:10px;color:#fff;min-width:220px;margin-left:auto}
.mine-context>span{font-size:22px}.mine-context b{display:block;font-size:15px}.mine-context small{display:block;color:#d3e3f0;font-size:13px;margin-top:5px}
.top-actions{display:flex;align-items:center;gap:14px;white-space:nowrap}.top-actions .avatar{width:42px;height:42px;border-radius:50%;background:#f2f7fc;color:#17446a;font-size:20px}.user-menu-text b{display:block;font-size:15px;color:#fff}.user-menu-text small{display:block;font-size:13px;color:#d5e3ef;margin-top:5px}.top-actions .logout{color:#fff;font-size:23px;margin:0 0 0 3px}.notification-bell{position:relative;font-size:25px;color:#fff;margin-right:6px}.notification-bell i{position:absolute;top:-6px;right:-9px;background:#f32638;color:#fff;border-radius:50%;font-style:normal;font-size:11px;font-weight:800;width:21px;height:21px;display:grid;place-items:center;border:1px solid #fff}
.sidebar{top:92px;bottom:0;width:252px;padding:15px 12px 0;background:linear-gradient(180deg,#073451,#062c47 74%,#05253c);border:0;border-radius:0;color:#fff;box-shadow:3px 0 12px #12354c12}
.sidebar .brand{display:none}.nav-label{color:#91b7d4;padding:12px 15px 10px;font-size:10px}.sidebar nav{display:flex;flex-direction:column;gap:7px}.nav-link{height:60px;margin:0;padding:0 16px;border-radius:9px;color:#f3f8fc;font-size:16px;font-weight:600;gap:17px}.nav-link:hover{background:#ffffff14}.nav-link.active{background:linear-gradient(100deg,#0872db,#075db5);border:0;box-shadow:0 5px 14px #001e3d44;color:white}.nav-icon{font-size:23px;width:24px;color:#fff}.sidebar-foot{position:relative;margin:280px -12px 0;padding:18px 20px 24px;background:linear-gradient(180deg,#06345199,#05253ee8),url('mine-sidebar.jpg') center/cover no-repeat;border:0;color:#d7e7f2;font-size:12px;min-height:190px}.sidebar-foot:before{content:'MAEMOS';display:block;font-size:22px;font-weight:800;color:#fff;margin-bottom:4px}.sidebar-foot:after{content:'Safe Mines\A Clean Air\A Continuous Monitoring';white-space:pre-line;display:block;color:#c3d8e7;font-size:15px;line-height:1.55;margin-top:6px}.sidebar-foot small{display:none}.sidebar-foot .status-dot{display:none}
.main{margin-left:252px;width:calc(100% - 252px);padding:24px 16px 25px;min-width:0}.welcome-card{display:none}.stats-grid{margin:0 0 16px;gap:12px}.stat-card,.panel{border-radius:13px;border-color:#dce6ef;box-shadow:0 3px 14px #173b5a0b}.panel{padding:20px;margin-bottom:15px}.panel-head{margin-bottom:16px}.panel-head h2{font-size:17px;color:#112b4c}.gauge-section{margin-top:0}.gauge-device{padding:18px 0;border-color:#e0e8f0}.gauge-device-heading h3{font-size:17px;color:#163656}.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.gauge-card{min-height:210px;border-radius:15px;border-color:#dbe6ef;background:linear-gradient(180deg,#fff,#f7faff);padding:15px 10px 12px}.gauge-title{font-size:13px;color:#183b61}.analog-meter{width:205px;height:116px}.meter-face{border-width:11px}.meter-needle{height:74px}.gauge-digital{font-size:31px;color:#0c3261}.gauge-digital small{font-size:12px}.gauge-scale{font-size:10px;color:#7188a0}.gauge-device-heading p{color:#7388a0}.live-indicator{color:#148c6d}.table-wrap{border-radius:9px}.user-workspace .sidebar{background:linear-gradient(180deg,#073451,#062c47 74%,#05253c);border:0}.admin-workspace .sidebar{background:linear-gradient(180deg,#073451,#062c47 74%,#05253c);border:0}.admin-workspace .nav-link.active,.user-workspace .nav-link.active{background:linear-gradient(100deg,#0872db,#075db5);border:0}.admin-workspace .nav-label,.user-workspace .nav-label{color:#91b7d4}.admin-workspace .sidebar-foot,.user-workspace .sidebar-foot{border:0}
@media(max-width:1100px){.top-brand{min-width:240px}.top-brand b{font-size:27px}.top-brand small{font-size:12px}.mine-context{min-width:160px}.sidebar{width:220px}.main{margin-left:220px;width:calc(100% - 220px)}.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.app-shell{padding-top:76px}.topbar{height:76px;padding:7px 12px;gap:8px}.top-brand{min-width:0;gap:7px}.top-brand img{width:47px;height:48px}.top-brand b{font-size:20px}.top-brand small{font-size:9px;white-space:normal;max-width:150px}.mine-context{display:none}.top-actions{gap:7px}.top-actions .avatar{width:32px;height:32px}.user-menu-text{display:none}.notification-bell{font-size:20px}.sidebar{position:relative;top:auto;width:100%;padding:8px 9px}.nav-label,.sidebar-foot{display:none}.sidebar nav{flex-direction:row;overflow-x:auto;gap:5px}.nav-link{height:42px;min-width:max-content;font-size:11px;padding:0 10px;gap:6px}.nav-icon{font-size:15px;width:auto}.main{margin:0;width:100%;padding:13px 10px 20px}.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gauge-card{min-height:185px}.analog-meter{width:150px;height:96px}.meter-needle{height:60px}.gauge-digital{font-size:24px}.panel{padding:14px 10px}.panel-head{gap:8px}.panel-head h2{font-size:14px}}
@media(max-width:420px){.top-brand b{font-size:17px}.top-brand small{max-width:125px}.top-brand img{width:38px}.gauge-grid{grid-template-columns:1fr 1fr}.gauge-title{font-size:11px}.analog-meter{width:125px}.gauge-digital{font-size:21px}}

/* Alpha 1.7 — closer match to supplied MAEMOS dashboard reference */
.sidebar{background:linear-gradient(180deg,rgba(4,48,76,.97),rgba(3,37,61,.98) 72%),url('mine-sidebar.jpg') center bottom/cover no-repeat!important}
.sidebar-foot{margin-top:clamp(110px,22vh,245px)!important;background:linear-gradient(180deg,rgba(5,49,76,.40),rgba(3,35,57,.92)),url('mine-sidebar.jpg') center/cover no-repeat!important}
.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0 0 11px!important}
.stat-card{min-height:72px!important;padding:9px 13px!important;display:grid;grid-template-columns:30px 1fr;grid-template-rows:auto auto;column-gap:9px;align-content:center;align-items:center}
.stat-card .stat-icon{grid-row:1/3;width:28px;height:28px;margin:0;font-size:14px}
.stat-card .stat-label{font-size:10px!important;line-height:1.15;align-self:end}
.stat-card strong{font-size:22px!important;line-height:1.05;align-self:start}
.stat-card small{display:none!important}
.gauge-section{padding:15px!important}
.gauge-section .panel-head{margin-bottom:10px!important}
.gauge-section .panel-head h2{font-size:16px!important}
.gauge-section .panel-head p{font-size:11px!important;margin-top:3px}
.gauge-device{padding:10px 0!important}
.gauge-device-heading{margin-bottom:9px!important}
.gauge-device-heading h3{font-size:14px!important;margin:0!important}
.gauge-device-heading p{font-size:10px!important;margin:3px 0 0!important}
.gauge-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
.gauge-card{min-height:0!important;padding:12px 7px 10px!important;border-radius:13px!important;overflow:hidden}
.gauge-title{font-size:12px!important;margin-bottom:3px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.analog-meter{width:min(100%,190px)!important;height:clamp(82px,8.4vw,112px)!important;margin:0 auto!important}
.meter-face{border-width:9px!important}
.meter-needle{height:clamp(48px,5vw,67px)!important;width:3px!important}
.meter-hub{width:11px!important;height:11px!important}
.gauge-digital{font-size:clamp(22px,2vw,30px)!important;line-height:1.1!important;margin-top:0!important}
.gauge-digital small{font-size:11px!important}
.gauge-scale{font-size:9px!important;margin-top:4px!important}
@media(max-width:1150px){.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.analog-meter{width:min(100%,205px)!important;height:105px!important}.gauge-digital{font-size:27px!important}}
@media(max-width:760px){.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}.stat-card{padding:7px 5px!important;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:70px!important}.stat-card .stat-icon{display:none}.stat-card .stat-label{font-size:9px!important}.stat-card strong{font-size:18px!important}.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.gauge-card{padding:10px 5px!important}.analog-meter{width:min(100%,155px)!important;height:88px!important}.gauge-title{font-size:11px!important}.gauge-digital{font-size:23px!important}.sidebar-foot{display:none!important}}

/* Alpha 1.8 precise dashboard refinements */
.sidebar{background:linear-gradient(180deg,rgba(4,48,76,.88),rgba(3,37,61,.94)),url('mine-sidebar.jpg') center center/cover no-repeat!important;}
.sidebar-foot{margin-top:clamp(110px,22vh,245px)!important;background:linear-gradient(180deg,rgba(5,49,76,.25),rgba(3,35,57,.82)),url('mine-sidebar.jpg') center center/cover no-repeat!important;}
.gauge-device-heading{min-height:0!important;margin:0 0 8px!important;justify-content:flex-end!important;}
.gauge-device-heading h3,.gauge-device-heading p{display:none!important;}
.gauge-updated{font-size:10px;color:#7188a0;margin-top:6px;line-height:1.3;white-space:normal;overflow-wrap:anywhere;}
@media(max-width:1150px){.gauge-updated{font-size:9px}}

/* Alpha 1.9: keep four sensor meters in each desktop row, including medium-width desktops */
@media(min-width:761px){
  .gauge-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
  .gauge-card{min-width:0!important;padding:12px 6px 10px!important}
  .analog-meter{width:min(100%,190px)!important;height:clamp(78px,8vw,112px)!important}
  .gauge-title{font-size:clamp(10px,1vw,13px)!important}
  .gauge-digital{font-size:clamp(20px,2vw,30px)!important}
}
@media(max-width:760px){.gauge-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Alpha 2.0 final: render sensor cards in one shared four-column grid across devices. */
@media (min-width: 761px){.gauge-section .gauge-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;width:100%!important}.gauge-section .gauge-card{min-width:0!important;width:auto!important}.gauge-section .gauge-device{display:contents!important}}
@media (max-width:760px){.gauge-section .gauge-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* Keep the mining background covering the complete sidebar from its top to bottom. */
.sidebar{background-image:linear-gradient(180deg,rgba(4,48,76,.86),rgba(3,37,61,.90)),url('mine-sidebar.jpg')!important;background-position:center center!important;background-size:cover!important;background-repeat:no-repeat!important;min-height:calc(100vh - 92px)!important;height:calc(100vh - 92px)!important;overflow:hidden!important}
.sidebar-foot{background:transparent!important;background-image:none!important;margin-top:auto!important;min-height:0!important}
@media(max-width:760px){.sidebar{height:auto!important;min-height:0!important}}


/* MAEMOS recovery patch: preserve full styling and enforce a single shared four-column sensor grid */
.gauge-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: none !important;
  gap: 14px !important;
  align-items: stretch;
}
.gauge-card {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
.sidebar {
  background-color: #082f49 !important;
  background-image: linear-gradient(rgba(4, 39, 61, .76), rgba(4, 39, 61, .88)), url('mine-sidebar.jpg') !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  min-height: 100vh !important;
}
@media (max-width: 900px) {
  .gauge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .gauge-grid { grid-template-columns: minmax(0, 1fr) !important; }
}


/* MAEMOS reference dashboard: final, authoritative customer sensor layout */
@media (min-width: 761px) {
  .gauge-section .gauge-device { display: contents !important; }
  .gauge-section .gauge-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    gap: 12px !important;
    margin: 10px 0 14px !important;
  }
  .gauge-section .gauge-card { min-width: 0 !important; width: auto !important; max-width: none !important; }
}
.gauge-section .gauge-card {
  cursor: pointer;
  position: relative;
  border: 1px solid #dbe6ef !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg,#fff,#f4f8fc) !important;
  box-shadow: 0 2px 7px rgba(16,52,82,.035);
  transition: transform .16s ease, box-shadow .16s ease;
}
.gauge-section .gauge-card:hover,.gauge-section .gauge-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(9,56,91,.12);
  outline: 2px solid #8fc5f7;
  outline-offset: 1px;
}
.gauge-section .gauge-title {
  display:flex; align-items:center; justify-content:flex-start; gap:7px;
  text-align:left; color:#102b4d !important; font-size:clamp(10px,1vw,13px) !important;
  text-transform:none; letter-spacing:0; white-space:normal; min-height:25px;
}
.sensor-icon {
  display:inline-grid; place-items:center; flex:0 0 25px; width:25px; height:25px;
  border-radius:50%; color:#fff; background:#0873dc; font-weight:800; font-size:13px;
  box-shadow:0 2px 5px #0873dc33;
}
.gauge-unit-top { margin-left:auto; font-size:10px; font-weight:600; color:#234568; white-space:nowrap; }
.gauge-section .analog-meter { width:min(100%,220px) !important; height:clamp(85px,9vw,130px) !important; }
.gauge-section .meter-face {
  border-width:10px !important;
  background:conic-gradient(from 270deg at 50% 50%,#16a66d 0deg,#50c878 48deg,#ffd52a 100deg,#ff9e00 135deg,#f02e2e 180deg,transparent 180deg) border-box !important;
}
.gauge-section .meter-face:before { background:#f9fbfe !important; }
.gauge-section .meter-needle { background:#102f4c !important; }
.gauge-section .gauge-digital { color:#0d3568 !important; font-size:clamp(21px,2vw,31px) !important; }
.gauge-section .gauge-minmax { display:flex; gap:8px; margin-top:9px; }
.gauge-section .gauge-minmax span { flex:1; min-width:0; padding:5px 3px; border:1px solid #e0e9f2; border-radius:9px; font-size:10px; color:#36516e; }
.gauge-section .gauge-minmax strong { display:block; margin-top:2px; font-size:13px; color:#122e51; }
.gauge-section .gauge-updated { font-size:9px !important; color:#7188a0; overflow-wrap:anywhere; }
.trend-panel { margin:14px 0 18px; padding:14px; border:1px solid #dbe6ef; border-radius:13px; background:linear-gradient(180deg,#fff,#f7faff); }
.trend-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.trend-head h3 { margin:0; color:#102b4d; font-size:14px; }
.trend-icon { color:#0875e1; font-size:22px; margin-right:6px; }
.trend-range { font-size:10px; color:#617d99; border:1px solid #dce6ef; border-radius:7px; padding:5px 8px; }
.trend-chart { height:150px; width:100%; }
.trend-chart svg { width:100%; height:100%; display:block; }
.trend-meta { display:flex; justify-content:space-between; gap:8px; color:#6d8298; font-size:10px; margin-top:5px; }
.trend-empty { color:#7188a0; font-size:11px; margin:10px 0 2px; }
.device-modal { display:none; position:fixed; inset:0; z-index:1000; align-items:center; justify-content:center; padding:18px; }
.device-modal.is-open { display:flex; }
.device-modal-backdrop { position:absolute; inset:0; background:rgba(4,25,43,.62); backdrop-filter:blur(3px); }
.device-modal-card { position:relative; z-index:1; width:min(620px,100%); max-height:85vh; overflow:auto; padding:24px; border-radius:16px; background:#fff; box-shadow:0 20px 70px #001b3355; }
.device-modal-card h2 { margin:0 35px 18px 0; color:#103454; font-size:20px; }
.device-modal-close { position:absolute; top:12px; right:14px; border:0; background:#edf3f8; color:#173b5a; border-radius:50%; width:34px; height:34px; font-size:24px; cursor:pointer; }
.device-info-list { display:grid; grid-template-columns:1fr 1fr; gap:0 22px; margin:0; }
.device-info-list div { display:grid; grid-template-columns:minmax(95px,.8fr) minmax(0,1.2fr); gap:8px; padding:10px 0; border-bottom:1px solid #e7edf3; }
.device-info-list dt { color:#637a91; font-size:12px; }
.device-info-list dd { margin:0; color:#142f4c; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .gauge-section .gauge-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; }
  .gauge-section .gauge-card { padding:10px 6px !important; }
  .gauge-section .analog-meter { height:88px !important; }
  .gauge-section .gauge-minmax { gap:4px; }
  .device-info-list { grid-template-columns:1fr; }
}

/* Final sidebar background: one continuous mine image from the first menu item to the footer. */
.sidebar {
  background-color:#063451 !important;
  background-image:linear-gradient(180deg,rgba(4,48,76,.78),rgba(3,37,61,.76)),url('mine-sidebar.jpg') !important;
  background-position:center center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  min-height:100vh !important;
  height:100vh !important;
}
.sidebar-foot { background:transparent !important; background-image:none !important; }


/* Gauge visibility fix: keep the complete arc, scale, needle and hub inside the meter viewport */
.gauge-card { overflow: visible; }
.analog-meter {
  height: 116px !important;
  width: 100% !important;
  max-width: 220px !important;
  position: relative !important;
  overflow: hidden !important;
  margin: 2px auto 0 !important;
}
.meter-face {
  position: absolute !important;
  left: 8% !important;
  right: 8% !important;
  top: 3px !important;
  height: 180px !important;
  border: 9px solid transparent !important;
  border-radius: 50% !important;
  background: conic-gradient(from 270deg at 50% 50%,
    #20ad78 0deg, #75cf7e 48deg, #ffcf45 105deg, #ff9d3c 145deg,
    #ed4d4d 180deg, transparent 180deg) border-box !important;
  clip-path: inset(0 0 49% 0) !important;
  transform: none !important;
}
.meter-face:before {
  content: '' !important;
  position: absolute !important;
  inset: 8px !important;
  border-radius: 50% !important;
  background: #f9fbfe !important;
  clip-path: inset(0 0 49% 0) !important;
}
.meter-needle {
  position: absolute !important;
  z-index: 6 !important;
  left: calc(50% - 2px) !important;
  top: auto !important;
  bottom: 5px !important;
  height: 44px !important;
  width: 4px !important;
  border-radius: 5px !important;
  background: #142f4e !important;
  transform-origin: 50% calc(100% - 1px) !important;
  transform: rotate(var(--meter-angle)) !important;
  box-shadow: 0 1px 3px #7c8ba0 !important;
}
.meter-hub {
  position: absolute !important;
  z-index: 7 !important;
  left: calc(50% - 6px) !important;
  top: auto !important;
  bottom: 0 !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: #173653 !important;
  border: 2px solid #dce7f2 !important;
}
.meter-min, .meter-max {
  position: absolute !important;
  z-index: 8 !important;
  top: 78px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  color: #213b59 !important;
  white-space: nowrap !important;
}
.meter-min { left: 3px !important; }
.meter-max { right: 3px !important; }
.gauge-oxygen .meter-face {
  background: conic-gradient(from 270deg at 50% 50%,
    #e94b4b 0deg, #ffb938 58deg, #f8d64e 110deg, #62c982 155deg,
    #1cad78 180deg, transparent 180deg) border-box !important;
}
.gauge-digital {
  margin-top: 0 !important;
  line-height: 1.1 !important;
}


/* Final analog meter geometry fix: keep the complete arc, scale labels and needle visible. */
.gauge-section .analog-meter {
  position: relative !important;
  width: min(100%, 190px) !important;
  height: 126px !important;
  overflow: visible !important;
  margin: 0 auto 2px !important;
}
.gauge-section .meter-face {
  position: absolute !important;
  left: 5px !important;
  right: 5px !important;
  top: 0 !important;
  height: 180px !important;
  border-radius: 50% !important;
  border: 10px solid transparent !important;
  background: conic-gradient(from 270deg at 50% 50%, #16a875 0deg, #65c97d 45deg, #f5cf35 90deg, #ff9d19 135deg, #f04438 180deg, transparent 180deg) border-box !important;
  clip-path: inset(0 0 48% 0) !important;
  transform: none !important;
}
.gauge-section .meter-face::before {
  content: "" !important;
  position: absolute !important;
  inset: 8px !important;
  border-radius: 50% !important;
  background: #f8fbff !important;
  clip-path: inset(0 0 48% 0) !important;
  z-index: 1 !important;
}
/* Tick ring around the semicircle. */
.gauge-section .meter-face::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  background: repeating-conic-gradient(from 270deg at 50% 50%, #263e60 0deg 1deg, transparent 1deg 15deg) !important;
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 77%, #000 78% 86%, transparent 87%) !important;
  mask: radial-gradient(circle at 50% 50%, transparent 0 77%, #000 78% 86%, transparent 87%) !important;
  clip-path: inset(0 0 48% 0) !important;
  pointer-events: none !important;
}
.gauge-section .meter-needle {
  position: absolute !important;
  z-index: 4 !important;
  left: calc(50% - 2px) !important;
  top: 25px !important;
  height: 65px !important;
  width: 4px !important;
  border-radius: 4px !important;
  background: #102b49 !important;
  transform-origin: 50% 100% !important;
  transform: rotate(var(--meter-angle, 0deg)) !important;
  box-shadow: 0 1px 3px #a8b4c5 !important;
}
.gauge-section .meter-hub {
  position: absolute !important;
  z-index: 5 !important;
  left: calc(50% - 6px) !important;
  top: 84px !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: #173653 !important;
  border: 2px solid #dbe5f0 !important;
}
.gauge-section .meter-min,
.gauge-section .meter-max {
  position: absolute !important;
  z-index: 6 !important;
  top: 82px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  color: #334b68 !important;
  white-space: nowrap !important;
}
.gauge-section .meter-min { left: 1px !important; }
.gauge-section .meter-max { right: 1px !important; }
.gauge-section .gauge-digital { margin-top: 0 !important; line-height: 1.15 !important; }
.gauge-section .gauge-minmax { margin-top: 6px !important; }
.gauge-section .gauge-card { overflow: visible !important; }
@media (max-width: 760px) {
  .gauge-section .analog-meter { width: min(100%, 180px) !important; height: 120px !important; }
  .gauge-section .meter-needle { top: 25px !important; height: 60px !important; }
  .gauge-section .meter-hub { top: 79px !important; }
  .gauge-section .meter-min, .gauge-section .meter-max { top: 77px !important; }
}


/* Scale visibility fix: clipped arc remains decorative; scale labels and needle are siblings. */
.gauge-section .analog-meter {
  position: relative !important;
  width: min(100%, 210px) !important;
  height: 126px !important;
  overflow: visible !important;
  isolation: isolate;
}
.gauge-section .meter-face {
  pointer-events: none !important;
  overflow: hidden !important;
}
.gauge-section .meter-min,
.gauge-section .meter-max {
  position: absolute !important;
  display: block !important;
  z-index: 10 !important;
  top: 81px !important;
  line-height: 12px !important;
  font-size: 10px !important;
  color: #183653 !important;
  white-space: nowrap !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.gauge-section .meter-min { left: 2px !important; }
.gauge-section .meter-max { right: 2px !important; }
.gauge-section .meter-needle {
  position: absolute !important;
  z-index: 11 !important;
  left: calc(50% - 2px) !important;
  top: 25px !important;
  bottom: auto !important;
  width: 4px !important;
  height: 65px !important;
  transform-origin: 50% 100% !important;
  transform: rotate(var(--meter-angle, 0deg)) !important;
  pointer-events: none !important;
}
.gauge-section .meter-hub {
  position: absolute !important;
  z-index: 12 !important;
  left: calc(50% - 6px) !important;
  top: 84px !important;
  bottom: auto !important;
  pointer-events: none !important;
}
@media (max-width: 760px) {
  .gauge-section .analog-meter { width: min(100%, 190px) !important; height: 126px !important; }
  .gauge-section .meter-min, .gauge-section .meter-max { top: 81px !important; }
}
