/* Unified application shell: compact footer navigation and consistent secondary-page header. */
.shared-topbar{
  height:74px;display:grid!important;grid-template-columns:1fr auto 1fr!important;
  align-items:center;gap:18px;max-width:1550px;margin:0 auto!important;padding:0!important;
  border:0!important;border-bottom:1px solid rgba(87,126,160,.18)!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
  backdrop-filter:none!important
}
.shared-brand{display:flex!important;align-items:center;gap:12px;color:#f4f7fc!important;text-decoration:none;min-width:0}
.shared-brand .brand-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;color:#1fcaff}
.shared-brand .brand-icon svg{width:29px;height:29px;fill:currentColor;stroke:none}
.shared-brand>span:last-child{white-space:nowrap;line-height:1;font-size:20px;font-weight:700;letter-spacing:.01em}
.shared-brand strong{color:#1fbfff;font-size:28px;letter-spacing:.035em}
.section-title{justify-self:center;min-width:220px;padding:8px 20px;border:1px solid #183554;border-radius:13px;background:linear-gradient(180deg,rgba(19,66,98,.38),rgba(6,31,47,.48));text-align:center;box-shadow:inset 0 -2px #2c9dff}
.section-title strong{display:block;color:#f4f7fc;font-size:14px;line-height:1.15;letter-spacing:.02em}
.section-title small{display:block;margin-top:3px;color:#8fa3b9;font-size:10px;line-height:1.1}
.shared-topbar .header-state{justify-self:end;display:flex;align-items:center;gap:12px}
.shared-topbar .live-state{display:flex;align-items:center;gap:8px;color:#c2cedc;font-size:13px}
.shared-topbar .live-state i{width:6px;height:6px;background:#22e574;border-radius:50%;box-shadow:0 0 8px #22e574}
.shared-topbar .live-state b{color:#37ed79;font-weight:500;text-transform:capitalize}
.shared-topbar .config-state i{background:#37a9ff;box-shadow:0 0 8px #37a9ff}
.shared-topbar .config-state b{color:#74c5ff}
.header-action{display:grid;place-items:center;width:38px;height:38px;color:#9caabd;text-decoration:none;font-size:19px;border-radius:10px}
.header-action:hover{color:#fff;background:rgba(55,169,255,.08)}

/* Same compact bottom navigation on every page. */
.bottom-nav{
  position:fixed!important;z-index:1000;left:50%!important;bottom:24px!important;transform:translateX(-50%)!important;
  width:min(620px,calc(100% - 24px))!important;height:56px!important;
  display:grid!important;grid-template-columns:repeat(4,1fr)!important;
  border:1px solid #173654!important;border-radius:17px!important;
  background:rgba(5,18,32,.94)!important;backdrop-filter:blur(18px)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.36)!important;overflow:hidden!important
}
.bottom-nav a{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;color:#9eacbd!important;text-decoration:none!important;font-size:12px!important;font-weight:600!important;position:relative!important;min-width:0!important}
.bottom-nav svg{width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;flex:0 0 20px!important}
.bottom-nav a.active{color:#3ba7ff!important;background:linear-gradient(180deg,rgba(23,75,116,.20),rgba(13,47,75,.10))!important}
.bottom-nav a.active:before{content:"";position:absolute;top:0;left:22%;right:22%;height:2px;background:#2c9dff;box-shadow:0 0 10px #2c9dff}

/* Credit is always directly below the compact footer navigation. */
.powered-credit,.app-credit{
  position:fixed!important;z-index:1001;left:50%!important;bottom:5px!important;transform:translateX(-50%)!important;
  margin:0!important;padding:0!important;width:auto!important;text-align:center!important;
  color:#64778c!important;font-size:10px!important;line-height:1!important;white-space:nowrap!important;
  background:transparent!important;border:0!important;box-shadow:none!important
}
.powered-credit strong,.app-credit strong{color:#91a3b8!important;font-weight:600!important}

.settings-page .app,.activity-page .app-shell,.analytics-page .analytics-app,.app-shell{padding-bottom:104px!important}

@media(max-width:820px){
  .shared-topbar{height:76px;grid-template-columns:1fr auto!important;gap:8px}
  .section-title{display:none}
  .shared-brand>span:last-child{font-size:0}
  .shared-brand>span:last-child strong{font-size:24px}
  .shared-brand>span:last-child strong:after{content:" Energy Center";font-size:16px;color:#fff;font-weight:600;letter-spacing:0}
  .shared-topbar .header-state{grid-column:2}
  .bottom-nav{bottom:22px!important;width:calc(100% - 14px)!important;height:54px!important;border-radius:16px!important}
  .bottom-nav a{gap:3px!important;flex-direction:column!important;font-size:9px!important}
  .bottom-nav svg{width:19px!important;height:19px!important}
  .powered-credit,.app-credit{bottom:4px!important;font-size:9px!important}
  .settings-page .app,.activity-page .app-shell,.analytics-page .analytics-app,.app-shell{padding-bottom:98px!important}
}
@media(max-width:480px){
  .shared-brand .brand-icon{width:28px;height:28px;flex-basis:28px}
  .shared-brand .brand-icon svg{width:24px;height:24px}
  .shared-topbar .live-state b{font-size:11px}
  .header-action{width:34px;height:34px}
}

/* P22 shell alignment fixes */
.settings-page .app{padding-top:0!important}
.settings-page .shared-topbar{margin-top:0!important}
.analytics-page .live-state b::before{content:none!important}

/* P24: keep YTE Energy Center on one line in every shared header */
.shared-brand>.brand-copy{display:inline-flex!important;flex-direction:row!important;align-items:baseline!important;gap:.28em!important;white-space:nowrap!important;line-height:1!important;font-size:20px!important;font-weight:700!important;letter-spacing:.01em!important}
.shared-brand>.brand-copy>span{display:inline!important;flex:none!important;font-size:20px!important;color:#f4f7fc!important;font-weight:700!important;line-height:1!important}
.shared-brand>.brand-copy>strong{display:inline!important;flex:none!important;color:#1fbfff!important;font-size:28px!important;line-height:1!important;letter-spacing:.035em!important}
@media(max-width:720px){.shared-brand>.brand-copy{font-size:16px!important;gap:.24em!important}.shared-brand>.brand-copy>span{font-size:16px!important}.shared-brand>.brand-copy>strong{font-size:24px!important}}
@media(max-width:390px){.shared-brand>.brand-copy>span{font-size:14px!important}.shared-brand>.brand-copy>strong{font-size:22px!important}}

/* P25: Activity header uses the same top offset as the other pages. */
.activity-shell .app-shell{padding-top:0!important}
.activity-shell .shared-topbar{margin-top:0!important}
@media(max-width:720px){.activity-shell .app-shell{padding-top:0!important}}
