
:root{
 --bg:#f1f4f8;--surface:#fff;--soft:#f8fafc;--line:#dfe6ef;--ink:#162c40;--ink2:#52667a;--muted:#8a9aab;
 --nav:#ffffff;--accent:#3979e8;--accent2:#17a6a1;--good:#3ab7a9;--goodbg:#e7f7f4;--warn:#d98e24;--bad:#e45e66;
 --shadow:0 7px 25px rgba(35,57,84,.07);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}
body{font-size:15px}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.ops-shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}
.ops-sidebar{position:sticky;top:0;height:100vh;background:var(--nav);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:22px 14px}
.ops-brand{display:flex;align-items:center;gap:11px;padding:4px 10px 22px}
.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:linear-gradient(145deg,#3979e8,#17a6a1);color:#fff;font-weight:900;font-size:1.1rem}
.ops-brand strong{display:block;font-size:1.02rem}.ops-brand span{display:block;color:var(--muted);font-size:.69rem;margin-top:2px}
.ops-nav{display:grid;gap:3px}
.ops-nav>a{display:flex;align-items:center;gap:11px;min-height:42px;padding:9px 11px;border-radius:9px;color:#395168;font-size:.82rem}
.ops-nav>a:hover{background:#f2f7fb}.ops-nav>a.active{background:#dff1f2;color:#145f70;font-weight:800}
.nav-glyph{display:grid;place-items:center;width:22px;color:#31536e;font-weight:800}
.nav-divider{height:1px;background:var(--line);margin:12px 8px}
.nav-section{padding:3px 11px 5px;color:var(--muted);font-size:.64rem;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.sidebar-foot{margin-top:auto;display:flex;align-items:center;gap:8px;padding:12px 10px;border-radius:11px;background:#f8fbfc}
.sidebar-foot strong,.sidebar-foot span{display:block}.sidebar-foot strong{font-size:.75rem}.sidebar-foot span{color:var(--muted);font-size:.64rem}
.online-dot{width:9px;height:9px;background:var(--good);border-radius:50%}
.ops-workspace{min-width:0}
.ops-header{height:88px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px}
.ops-header h1{margin:0;font-size:1.2rem}.ops-header>div:first-child>span{display:block;color:var(--muted);font-size:.76rem;margin-top:5px}
.header-actions{display:flex;align-items:center;gap:13px;color:var(--ink2);font-size:.76rem}.header-site{padding:6px 9px;background:#f4f7fa;border-radius:7px}.avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:#d8f4f3;color:#158c87;font-weight:850}
.ops-main{padding:26px;max-width:1560px;margin:0 auto}
.metric-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}
.metric-strip article{background:#fff;border:1px solid var(--line);border-radius:13px;padding:17px 18px;box-shadow:var(--shadow)}
.metric-strip span,.metric-strip strong,.metric-strip small{display:block}.metric-strip span{color:var(--muted);font-size:.66rem;text-transform:uppercase;font-weight:850;letter-spacing:.05em}.metric-strip strong{font-size:1.8rem;margin-top:8px}.metric-strip small{color:var(--muted);font-size:.72rem;margin-top:4px}.metric-strip .good strong{color:var(--good)}.metric-strip .warn strong{color:var(--warn)}.metric-strip .alarm strong{color:var(--bad)}.metric-strip .predictive strong{color:var(--accent)}
.dashboard-grid{display:grid;grid-template-columns:1.3fr .8fr;gap:15px}
.ops-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.card-title{display:flex;justify-content:space-between;align-items:center;padding:18px 19px;border-bottom:1px solid var(--line)}
.card-title h2{margin:0;font-size:1rem}.card-title span{display:block;color:var(--muted);font-size:.72rem;margin-top:3px}.card-title a{color:var(--accent);font-size:.75rem;font-weight:750}
.alarm-chart-card{min-height:315px}.bar-chart{height:220px;display:flex;align-items:flex-end;gap:18px;padding:26px 25px 12px;border-bottom:1px solid #edf1f5}
.bar-column{flex:1;min-width:35px;text-align:center;position:relative}.bar-stack{height:170px;display:flex;align-items:flex-end;justify-content:center;gap:2px}.bar{display:block;width:26%;min-width:14px;border-radius:4px 4px 0 0}.bar.resolved{background:#7db06f}.bar.open{background:#e85563}.bar-column>strong{display:block;font-size:.72rem;margin-top:5px}.bar-column small{color:var(--muted);font-size:.65rem}.legend{display:flex;gap:16px;padding:10px 20px;color:var(--ink2);font-size:.68rem}.legend i{display:inline-block;width:9px;height:9px;margin-right:5px}.legend-good{background:#7db06f}.legend-bad{background:#e85563}
.health-overview{min-height:315px}.health-ring-wrap{display:flex;align-items:center;justify-content:center;gap:28px;padding:28px 18px 18px}.health-ring{width:150px;height:150px;border-radius:50%;background:conic-gradient(var(--good) 0 calc(var(--pct) * 1%),#e9eef3 0);display:grid;place-items:center}.health-ring>div{width:112px;height:112px;background:#fff;border-radius:50%;display:grid;place-items:center;align-content:center}.health-ring strong{font-size:1.8rem}.health-ring span{font-size:.7rem;color:var(--muted)}.health-copy{display:grid;gap:9px}.health-copy strong{font-size:1rem}.health-copy span{font-size:.75rem;color:var(--ink2)}.predictive-callout{margin:0 18px 18px;padding:12px 13px;border-radius:10px;background:#edf5ff}.predictive-callout span{display:block;color:var(--accent);font-size:.65rem;font-weight:850;text-transform:uppercase}.predictive-callout strong{display:block;margin-top:4px;font-size:.78rem}
.recent-alarms,.group-summary{min-height:260px}.compact-table{display:grid}.compact-table>a{display:grid;grid-template-columns:14px 1fr auto 145px;gap:10px;align-items:center;padding:12px 18px;border-bottom:1px solid #edf1f5;font-size:.72rem}.compact-table>a:last-child{border-bottom:0}.compact-table strong,.compact-table small{display:block}.compact-table small{color:var(--muted);margin-top:2px}.compact-table time{color:var(--muted)}.state-dot{width:9px;height:9px;border-radius:50%;background:var(--warn)}.state-dot.resolved{background:var(--good)}.state-dot.active{background:var(--bad)}
.group-summary-list{display:grid;padding:8px 0}.group-summary-list a{display:flex;justify-content:space-between;align-items:center;padding:11px 18px;border-bottom:1px solid #edf1f5;font-size:.75rem}.group-summary-list a:last-child{border-bottom:0}.group-summary-list strong,.group-summary-list span{display:block}.group-summary-list div span{color:var(--muted);margin-top:2px}.group-summary-list>a>span{color:var(--ink2)}
.page-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:15px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:14px 16px;box-shadow:var(--shadow)}
.page-toolbar>div:first-child strong,.page-toolbar>div:first-child span{display:block}.page-toolbar>div:first-child span{color:var(--muted);font-size:.76rem;margin-top:4px}
.filter-row{display:flex;gap:10px;align-items:flex-end}.page-toolbar label{display:grid;gap:5px}.page-toolbar label>span{color:var(--muted);font-size:.65rem;font-weight:800;text-transform:uppercase}.page-toolbar select,.page-toolbar input{min-height:40px;padding:8px 10px;border:1px solid #cfd9e3;border-radius:8px;background:#fff;color:var(--ink);min-width:190px}.search-field input{min-width:300px}.search-field.wide input{min-width:480px}
.primary-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 13px;border:0;border-radius:8px;background:#5c8ff4;color:#fff;font-size:.76rem;font-weight:800}
.equipment-table-card{overflow:hidden}.equipment-table-head,.equipment-row{display:grid;grid-template-columns:38px 62px 62px minmax(190px,1.2fr) minmax(130px,.8fr) 115px 100px 155px;align-items:center;gap:8px}.equipment-table-head{padding:12px 15px;background:#fafbfd;border-bottom:1px solid var(--line);color:#52667a;font-size:.69rem;font-weight:800}.equipment-row-wrap{border-bottom:1px solid #e8edf2}.equipment-row-wrap:last-child{border-bottom:0}.equipment-row{min-height:58px;padding:8px 15px;font-size:.73rem}.equipment-row:hover{background:#fbfdff}.expand-btn{width:27px;height:27px;border:0;background:transparent;color:#6e8294;font-size:1.25rem}.expand-btn.open{transform:rotate(90deg)}.icon-state{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;color:#fff;font-size:.66rem;font-weight:900}.icon-state.ok{background:#55c2b8}.icon-state.bad{background:#ea626c}.equipment-row a{color:#244c6a;font-weight:750}.equipment-row small{display:block;color:var(--muted);margin-top:2px}.group-chips{display:flex;gap:4px;flex-wrap:wrap}.group-chips span{padding:4px 6px;border-radius:999px;background:#eef5fb;color:#42708f;font-size:.62rem}.group-chips .muted-chip{background:#f1f3f5;color:#8a98a5}.health-cell strong{font-size:.9rem}.health-cell span{font-size:.65rem;color:var(--muted)}.equipment-row time{color:var(--muted);font-size:.68rem}.equipment-expand{display:grid;grid-template-columns:1fr auto;gap:15px;padding:15px 58px 17px;background:#f9fbfd;border-top:1px dashed #dbe3eb}.sparkline-panel{display:grid;grid-template-columns:150px 1fr;gap:15px;align-items:center}.sparkline-panel span,.sparkline-panel strong{display:block}.sparkline-panel span{color:var(--muted);font-size:.67rem}.sparkline-panel strong{margin-top:4px}.equipment-sparkline{width:100%;height:110px}.expand-actions{display:grid;gap:7px;align-content:center}.expand-actions a{color:var(--accent);font-size:.73rem}
.calendar-card{padding:0 0 18px}.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}.calendar-toolbar>div:first-child{display:flex;gap:5px}.calendar-toolbar button{min-height:34px;padding:7px 10px;border:1px solid #d2dce5;background:#fff;border-radius:7px;color:#395168}.calendar-toolbar h2{margin:0;font-size:1.05rem}.view-switch{display:flex;background:#20364a;border-radius:7px;padding:2px}.view-switch button{border:0;background:transparent;color:#dbe5ed}.view-switch button.active{background:#102435;color:#fff}
.month-grid{display:grid;grid-template-columns:repeat(7,1fr);margin:15px;border-left:1px solid var(--line);border-top:1px solid var(--line)}.calendar-weekday{padding:9px;text-align:center;color:#3979e8;font-size:.68rem;font-weight:850;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.calendar-day{min-height:116px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);position:relative;background:#fff}.calendar-day.other{background:#fafbfd;color:#bdc7d0}.calendar-day.today{background:#fffbe9}.calendar-day-number{display:block;text-align:right;color:#4f85ed;font-size:.68rem}.calendar-event{display:block;margin-top:5px;padding:4px 6px;border-radius:3px;background:#38516a;color:#fff;font-size:.61rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.week-list,.day-list{display:grid;margin:15px;border:1px solid var(--line);border-radius:10px;overflow:hidden}.agenda-row{display:grid;grid-template-columns:130px 1fr 190px;gap:12px;padding:13px 15px;border-bottom:1px solid var(--line);font-size:.74rem}.agenda-row:last-child{border-bottom:0}.agenda-row time{color:var(--muted)}
.modal-backdrop{position:fixed;inset:0;background:rgba(25,37,50,.33);display:grid;place-items:center;padding:20px;z-index:50}.modal-backdrop[hidden]{display:none}.modal-card{width:min(720px,95vw);background:#fff;border-radius:13px;box-shadow:0 25px 70px rgba(19,35,52,.28)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:17px 20px;border-bottom:1px solid var(--line)}.modal-head h2{margin:0;font-size:1.08rem}.modal-head button{border:0;background:transparent;font-size:1.4rem;color:#8c9aa8}.modal-form{display:grid;gap:13px;padding:18px 20px}.modal-form label{display:grid;gap:5px}.modal-form label>span{color:var(--ink2);font-size:.7rem;font-weight:800}.modal-form input,.modal-form select,.modal-form textarea{width:100%;padding:10px 11px;border:1px solid #cfd9e3;border-radius:8px;background:#fff}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:7px}.modal-actions>button:first-child{border:0;background:#f1f4f7;color:#6d7f90;border-radius:8px;padding:9px 12px}
.organization-layout{display:grid;grid-template-columns:minmax(500px,1fr) 330px;gap:15px}.org-tree-card{padding:17px}.org-root,.org-line{display:flex;align-items:center;gap:7px;min-height:35px}.org-root small,.org-line small{color:var(--muted);font-size:.66rem}.tree-toggle{border:0;background:transparent;color:#667c91}.tree-icon{color:#4b6984}.tree-children{padding-left:24px}.org-group{margin:4px 0}.org-equipment{display:grid;padding-left:35px}.org-equipment a{display:flex;align-items:center;gap:7px;min-height:31px;color:#34536d;font-size:.73rem}.org-equipment a small{color:var(--muted);margin-left:5px}.org-help{padding:18px;height:max-content}.org-help h3{margin:0}.org-help p{color:var(--ink2);font-size:.77rem;line-height:1.55}.org-help a{display:block;color:var(--accent);font-size:.75rem;margin-top:10px}
.users-card,.audit-card{overflow:hidden}.users-table-head,.user-row{display:grid;grid-template-columns:1.2fr .55fr 1.5fr .55fr 90px;gap:12px;align-items:center}.users-table-head{padding:12px 15px;background:#fafbfd;border-bottom:1px solid var(--line);font-size:.68rem;font-weight:800}.user-row{padding:11px 15px;border-bottom:1px solid #e8edf2;font-size:.73rem}.user-row:last-child{border-bottom:0}.user-row strong,.user-row small{display:block}.user-row small{color:var(--muted);margin-top:2px}.role-chip,.status-chip{display:inline-flex;width:max-content;padding:4px 7px;border-radius:999px;font-size:.63rem;font-weight:800}.role-chip{background:#eef3fb;color:#4e6d9a}.status-chip.enabled{background:#e6f7f1;color:#2d8a69}.status-chip.disabled{background:#f0f2f4;color:#8896a2}.user-row>a{color:var(--accent);font-weight:750}
.audit-head,.audit-row{display:grid;grid-template-columns:155px 1fr 1fr .8fr 1.7fr;gap:10px;align-items:center}.audit-head{padding:12px 15px;background:#fafbfd;border-bottom:1px solid var(--line);font-size:.68rem;font-weight:800}.audit-row{padding:11px 15px;border-bottom:1px solid #e8edf2;font-size:.71rem}.audit-row:last-child{border-bottom:0}.audit-row time,.audit-row span{color:var(--ink2)}
.empty-state{display:grid;place-items:center;color:var(--muted);font-size:.76rem;min-height:120px}.empty-state.roomy{min-height:220px}
@media(max-width:1200px){.metric-strip{grid-template-columns:repeat(3,1fr)}.dashboard-grid{grid-template-columns:1fr}.equipment-table-head,.equipment-row{grid-template-columns:34px 55px 55px 1.3fr .8fr 105px 90px}.equipment-table-head span:last-child,.equipment-row time{display:none}.organization-layout{grid-template-columns:1fr}}
@media(max-width:850px){.ops-shell{display:block}.ops-sidebar{position:relative;width:auto;height:auto}.ops-nav{grid-template-columns:repeat(2,1fr)}.sidebar-foot{display:none}.metric-strip{grid-template-columns:repeat(2,1fr)}.ops-main{padding:16px}.equipment-table-head{display:none}.equipment-row{grid-template-columns:30px 40px 40px 1fr}.equipment-row>*:nth-child(n+5){display:none}.search-field input,.search-field.wide input{min-width:180px}.organization-layout{grid-template-columns:1fr}.users-table-head{display:none}.user-row{grid-template-columns:1fr auto}.user-row>*:nth-child(3),.user-row>*:nth-child(4){display:none}}
.metric-link{display:block;text-decoration:none;color:inherit}.metric-link article{height:100%}.metric-link:hover article{box-shadow:0 8px 24px rgba(31,55,80,.12);transform:translateY(-1px)}.active-filter{padding:8px 12px;border-radius:999px;background:#e8f3f8;color:#24617c;font-weight:700;text-transform:capitalize}
/* V6.4 stabilization */
.org-unassigned{margin-top:18px;padding-top:14px;border-top:1px solid #e1e8ef;display:grid;gap:7px}.org-unassigned>a{display:flex;gap:8px;align-items:center;text-decoration:none;color:inherit;padding:8px;border-radius:8px;background:#f7fafc}.org-unassigned>a small{margin-left:auto;color:#8091a2}.calendar-event{border:0;text-align:left;cursor:pointer}.agenda-row{width:100%;border:0;text-align:left;cursor:pointer}
