
aside{width:76px;padding:20px 10px;z-index:1000;overflow-x:hidden;overflow-y:auto;transition:width .2s ease,transform .2s ease}main{margin-left:76px;max-width:none;padding:28px 32px}aside .brand{min-height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0}aside .brand-logo{display:none}aside .brand:after{content:'EN';font-size:21px;color:#087f83;letter-spacing:-1px}.sidebar-menu-heading{display:flex;align-items:center;gap:12px;margin:22px 0 14px;min-height:36px}.sidebar-menu-heading .muted{font-size:12px;letter-spacing:1px;margin:0;color:#c3d5dd;display:none}.sidebar-toggle{padding:8px;display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:38px}.sidebar-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}#sidebarToggle{color:#c3d5dd;background:transparent}nav{gap:6px}nav [data-page]{display:flex;align-items:center;gap:13px;min-height:43px;padding:10px 15px;flex-shrink:0}nav [data-page] svg{width:21px;height:21px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}nav [data-page] .nav-label{display:none;white-space:nowrap;font-size:13px}.account{padding-top:18px}.account #identity,.account .company-brand{display:none}.account-actions{display:flex;flex-direction:column;align-items:center;gap:8px}.account-actions button span{display:none}.account-actions button{width:43px;min-height:40px;justify-content:center;padding:9px}.identity-row{display:inline-flex;gap:5px;margin:8px 0;align-items:baseline;min-width:0}.identity-row:first-child{flex:1}.identity-row:last-child{flex-shrink:0}.identity-caption{color:#a3becb;font-size:11px}.identity-row strong{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.sidebar-open aside{width:256px;box-shadow:8px 0 28px #102d3b22}body.sidebar-open aside .brand-logo{display:block}body.sidebar-open aside .brand:after{display:none}body.sidebar-open .sidebar-menu-heading .muted,body.sidebar-open nav [data-page] .nav-label{display:block}body.sidebar-open aside .brand{justify-content:initial}body.sidebar-open .account #identity,body.sidebar-open .account .company-brand{display:block}body.sidebar-open .account-actions{flex-direction:row;justify-content:space-between}body.sidebar-open .account-actions button{width:auto;flex:1}body.sidebar-open .account-actions button span{display:inline}#mobileMenuButton{display:none}.sidebar-backdrop{position:fixed;inset:0;z-index:999;border:0;border-radius:0;background:#102d3b66}.sidebar-backdrop[hidden]{display:none!important}@media(max-width:900px){aside{inset:0 auto 0 0;position:fixed;width:256px;height:100dvh;transform:translateX(-100%);padding:22px 16px}body.sidebar-open aside{transform:translateX(0)}main{margin-left:0;padding:20px}#mobileMenuButton{display:inline-flex;flex-shrink:0}header{gap:12px}header>div{flex:1}aside .brand-logo{display:block}aside .brand:after{display:none}.sidebar-menu-heading .muted,nav [data-page] .nav-label,.account #identity,.account .company-brand{display:block}.account-actions{flex-direction:row;justify-content:space-between}.account-actions button{width:auto;flex:1}.account-actions button span{display:inline}nav{display:grid;grid-template-columns:1fr;margin:0}.account{margin-top:auto}.company-brand{display:block!important}aside .brand{width:auto}.company-logo{max-width:150px}.company-logo img{height:36px}}@media(prefers-reduced-motion:reduce){aside{transition:none}}@media print{main{margin:0;padding:0}.sidebar-backdrop,#mobileMenuButton{display:none!important}}

body.sidebar-open .account #identity{display:flex;align-items:baseline;gap:12px;white-space:nowrap}@media(max-width:900px){.account #identity{display:flex;align-items:baseline;gap:12px;white-space:nowrap}}

nav a[data-page]{text-decoration:none;border:1px solid transparent;border-radius:7px;font-weight:600}nav a[data-page]:hover{filter:brightness(.93)}nav a[data-page]:focus-visible{outline:3px solid #e7ae43;outline-offset:2px}

@media screen {
  :root { --nav-surface:#f7faff;--nav-text:#243f60;--nav-muted:#5f7481;--nav-border:#cbdcf1;--nav-active:#dceafa;--nav-active-text:#075b6b; }
  html[data-content-theme=dark] { --nav-surface:#152238;--nav-text:#dbeafe;--nav-muted:#a9bbd3;--nav-border:#364b68;--nav-active:#243f60;--nav-active-text:#5eead4; }
  aside { background:var(--nav-surface);color:var(--nav-text);border-right:1px solid var(--nav-border);color-scheme:light; }
  html[data-content-theme=dark] aside { color-scheme:dark; }
  aside nav [data-page] { color:var(--nav-text); }
  aside nav [data-page].active { background:var(--nav-active);color:var(--nav-active-text); }
  aside :is(.muted,.sidebar-menu-heading .muted,.identity-caption,.company-brand>span),aside #sidebarToggle { color:var(--nav-muted); }
  aside .company-brand { border-color:var(--nav-border); }
  html[data-content-theme=dark] aside .brand:after { color:var(--nav-active-text); }
}

/* Screen density for work pages. Overview and printed reports retain their layout. */
main { position:relative; }
.page-header-bar { display:flex;align-items:center;gap:8px;min-height:26px; }
.page-header-toggle { display:flex;align-items:center;justify-content:center;gap:6px;margin-left:auto;padding:3px 10px;min-height:24px;font-size:11px;color:#52677a;background:transparent;border-color:#d7e2e6; }
/* Keep the hover/touch target and keyboard focus without a visible dropdown. */
#pageHeaderToggle { background:transparent;border-color:transparent;box-shadow:none; }
.page-header-toggle > span,.page-header-toggle > svg { visibility:hidden; }
.page-header-toggle svg { width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;transition:transform .15s; }
.page-header-toggle[aria-expanded=true] svg { transform:rotate(180deg); }
main>header#pageHeaderContent { position:relative;flex-wrap:wrap;padding:14px 16px;margin:0 0 8px;background:#fff;border:1px solid #d7e2e6;border-radius:8px; }
html[data-content-theme=dark] main>header#pageHeaderContent { background:#1b2a3f;border-color:#364b68; }
html[data-content-theme=dark] .page-header-toggle { color:#c3d4ec;border-color:#364b68;background:#152238; }
@media(max-width:900px) { .page-header-bar #mobileMenuButton { display:inline-flex;min-height:30px;padding:4px; } }
@media print { .page-header-bar { display:none!important; } }
@media screen {
  main:has(> .page:not(#dashboard):not([hidden])) { padding:12px 16px; }
  main:has(> .page:not(#dashboard):not([hidden])) > header { min-height:48px;gap:10px; }
  main:has(> .page:not(#dashboard):not([hidden])) > header h1 { font-size:24px;margin:0; }
  main:has(> .page:not(#dashboard):not([hidden])) > header .eyebrow { margin:0 0 2px; }
  main:has(> .page:not(#dashboard):not([hidden])) > header .header-customer-logos img { max-height:38px; }

  :where(.page:not(#dashboard)) .card { padding:14px;margin:10px 0; }
  :where(.page:not(#dashboard)) h2 { margin-bottom:8px; }
  :where(.page:not(#dashboard)) p { margin-block:8px; }
  :where(.page:not(#dashboard)) label { gap:4px;margin-bottom:10px;min-width:0; }
  :where(.page:not(#dashboard)) input,
  :where(.page:not(#dashboard)) select,
  :where(.page:not(#dashboard)) textarea { padding:6px 8px;font-size:13px; }
  :where(.page:not(#dashboard)) button { padding:7px 11px;font-size:13px; }
  :where(.page:not(#dashboard)) .grid { gap:10px; }
  :where(.page:not(#dashboard)) .toolbar,
  :where(.page:not(#dashboard)) .actions { gap:8px; }
  :where(.page:not(#dashboard)) .actions { margin-top:8px; }
  :where(.page:not(#dashboard)) th,
  :where(.page:not(#dashboard)) td { padding:7px 8px; }
  :where(.page:not(#dashboard)) .parameter-editor { padding:10px;margin:10px 0; }
  :where(.page:not(#dashboard)) .parameter-editor h3 { margin-bottom:8px; }
  :where(.page:not(#dashboard)) .parameter-fields { gap:8px; }
  :where(.page:not(#dashboard)) .parameter-fields > .parameter-row { padding:4px 0; }
  :where(.page:not(#dashboard)) .parameter-collection { padding:8px;margin:6px 0; }
  :where(.page:not(#dashboard)) .point-toolbar { gap:8px;margin-bottom:8px; }
  :where(.page:not(#dashboard)) .point-table-scroll { max-height:calc(100dvh - 220px); }
  :where(.page:not(#dashboard)) .point-editor-expanded .point-table-scroll { max-height:none; }
  :where(.page:not(#dashboard)) .point-editor-expanded { margin:0; }

  #devices .device-table-editor:not(.point-editor-expanded) .point-table-scroll { max-height:calc(100dvh - 220px); }
  #live .live-toolbar { margin:6px 0 10px;flex-wrap:wrap; }
  #live .live-toolbar > p { margin:0; }
  #live .live-controls { display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-wrap:wrap; }
  #live .live-controls input { width:260px;max-width:100%; }
  #live .live-controls select { max-width:220px; }
  #live .live-groups-scroll { padding:0 4px;max-height:calc(100dvh - 150px); }
  #live .live-type-group { margin:2px 0; }
  #live .live-type-group > h3 { margin:4px 0;line-height:18px; }
  #live .live-summary-table { min-width:760px;font-size:12px; }
  #live .live-summary-table th:nth-child(2) { width:140px; }
  #live .live-summary-table th:nth-child(3) { width:155px; }
  #live .live-summary-table th:nth-child(n+4) { min-width:85px;line-height:1.25; }
  #live .live-summary-table th { padding:4px 5px; }
  /* Compact desktop rows leave room for 30 devices in the live workspace. */
  #live .live-device-row > td { padding:0 5px;line-height:16px; }
  #live .live-device-row .point-expand { display:block;height:16px;padding:0 6px;font-size:11px;line-height:16px; }
  #live .live-detail-table th,#live .live-detail-table td { padding:4px 6px; }
  #analysis .analysis-range .actions { margin-top:10px; }
  #analysis .analysis-range input { padding-right:40px; }
  #analysis .analysis-plot { height:clamp(300px,48dvh,470px); }
  #analysisSettings .analysis-series-row { padding:8px 0;gap:8px; }
  #reports #parameterSelections fieldset { padding:10px;margin:8px 0;min-width:0; }
  #reports .report-filters { grid-template-columns:2fr repeat(3,minmax(0,1fr)); }
  #reports .toolbar h2 { margin:0; }
  #reports .toolbar { margin-bottom:8px; }
  #reports .report-brand { gap:12px; }
  #reports .report-brand img { max-height:42px; }
  #reports .report-brand h2,#reports .report-brand p { margin:2px 0; }
  #reports #reportTable { max-height:calc(100dvh - 360px); }
  #reports #reportTable table { font-size:12px; }
  #reports #reportTable th { padding:4px 5px;position:sticky;top:0; }
  #reports #reportTable td { padding:0 5px;line-height:16px; }
  #reports #reportPagination label { margin:0;gap:6px; }

  @media (max-width:950px) {
    #reports .report-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }

  @media (max-width:650px) {
    #reports .report-filters { grid-template-columns:1fr; }
    #reports #reportTable { max-height:60dvh; }
    #live .live-controls { width:100%; }
    #live .live-controls input { flex:1;min-width:150px; }
    main:has(> .page:not(#dashboard):not([hidden])) { padding:10px; }
    :where(.page:not(#dashboard)) .card { padding:10px; }
    /* Keep touch controls comfortable on small screens. */
    :where(.page:not(#dashboard)) button,
    :where(.page:not(#dashboard)) input,
    :where(.page:not(#dashboard)) select { min-height:34px; }
  }
}

/* Menu groups (item 39): a caption when the menu is open, a divider when it is folded. */
.nav-group{margin:12px 0 2px;padding:0 15px;font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:#8faab6;white-space:nowrap}
body:not(.sidebar-open) .nav-group{font-size:0;height:1px;padding:0;margin:8px 10px;background:#2f5868}
@media(max-width:900px){body:not(.sidebar-open) .nav-group{font-size:10px;height:auto;padding:0 15px;margin:12px 0 2px;background:none}}
/* The theme button is icon-only so Password and Sign out keep their labels (item 39). */
.account-actions .theme-action span{display:none!important}body.sidebar-open .account-actions .theme-action,.account-actions .theme-action{flex:none;width:43px;min-width:43px}
/* Running build (EnerNexus version and commit) under the account name; shown with the open sidebar. */
.app-version{margin:4px 0 0;font-size:11px;color:#a3becb;overflow-wrap:anywhere}.account .app-version{display:none}body.sidebar-open .account .app-version:not([hidden]){display:block}@media(max-width:900px){.account .app-version:not([hidden]){display:block}}
