/* Shared navigation: primary pages, secondary views, and period segments. */
.app-tabbar {
  display: flex !important;
  align-items: stretch !important;
  gap: 6px !important;
  min-width: 0;
  max-width: 100%;
  font-family: 'DM Sans', sans-serif;
}
.app-tabbar > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px !important;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  font: 600 12px/1.25 'DM Sans', sans-serif !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color .15s, border-color .15s, color .15s !important;
}
.app-tabbar > button:focus-visible,
.app-design-header button:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 3px;
}
.app-tabbar > button:disabled {
  opacity: .4;
  cursor: default;
}
.app-tabbar.app-tabbar-secondary {
  flex-wrap: wrap !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.app-tabbar.app-tabbar-secondary > button {
  flex: 0 0 auto !important;
  border: 1px solid #2d3148 !important;
  background: transparent !important;
  color: #9ca3af !important;
}
.app-tabbar.app-tabbar-secondary > button[aria-pressed="true"],
.app-tabbar.app-tabbar-secondary > button[aria-selected="true"],
.app-tabbar.app-tabbar-secondary > button[aria-current="page"] {
  border-color: #4f46e5 !important;
  background: #4f46e51a !important;
  color: #e8eaf0 !important;
}
.app-tabbar.app-tabbar-primary,
.app-tabbar.app-tabbar-period {
  flex-wrap: nowrap !important;
  gap: 3px !important;
  padding: 4px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: #12141f !important;
}
.app-tabbar.app-tabbar-primary > button,
.app-tabbar.app-tabbar-period > button {
  flex: 1 1 0 !important;
  min-width: 0;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #9ca3af !important;
}
.app-tabbar.app-tabbar-primary > button[aria-pressed="true"],
.app-tabbar.app-tabbar-primary > button[aria-current="page"],
.app-tabbar.app-tabbar-period > button[aria-pressed="true"],
.app-tabbar.app-tabbar-period > button[aria-selected="true"] {
  background: #2d3148 !important;
  color: #e8eaf0 !important;
}
.app-tabbar.app-tabbar-period {
  flex-wrap: wrap !important;
}
.app-tabbar.app-tabbar-period > button {
  min-height: 38px !important;
  padding: 6px 10px !important;
}
.main-wrap > .app-design-header.app-design-header-tabs {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 16px !important;
  width: 100%;
  max-width: 1000px;
  padding: 12px 20px !important;
}
.app-design-header > div:first-child > button {
  min-width: 44px;
  min-height: 44px;
}
.app-design-header > div:last-child > button {
  min-height: 44px;
  min-width: 44px;
}
.app-design-header .app-tabbar-primary {
  margin: 0 !important;
}
.app-subnav {
  width: 100%;
  max-width: 1000px;
  padding: 0 20px 8px;
}
.app-subnav:empty {
  display: none;
}
/* Existing reusable segments share the same selected surface and focus style. */
.st-segments button[aria-pressed="true"],
.energy-design .ed-segment button[aria-selected="true"],
.energy-design .ed-segment button[aria-pressed="true"] {
  background: #2d3148;
  color: #e8eaf0;
}
@media (max-width:700px) {
  .main-wrap > .app-design-header.app-design-header-tabs {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px !important;
    padding: 10px 20px !important;
  }
  .app-design-header-tabs > .app-tabbar-primary {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  .app-design-header-tabs > div:last-child {
    grid-column: 2;
    grid-row: 1;
  }
  .app-tabbar > button {
    font-size: 11px !important;
    padding: 8px 10px !important;
  }
  .app-tabbar.app-tabbar-primary > button {
    padding: 8px 6px !important;
  }
}
@media (prefers-reduced-motion:reduce) {
  .app-tabbar > button {
    transition: none !important;
  }
}
.app-design-header .app-settings-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.app-design-header > div:last-child > div > button {
  min-height: 44px;
  min-width: 44px;
}
