.app-shell { min-height: 100dvh; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 25;
  border-bottom: 0;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(24px);
}
.header-inner {
  width: min(100% - 1.35rem, var(--max-width));
  margin: 0 auto;
  padding: .9rem 0 .48rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  font-size: clamp(1.45rem, 5vw, 1.78rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.07em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.15rem;
}
.header-actions {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
}
.header-pill,
.icon-button,
.chip-button,
.primary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: 0 .82rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  color: var(--text);
  font-weight: 850;
  box-shadow: none;
}
.icon-button { width: 40px; padding: 0; font-size: 1rem; }
.primary-button { background: var(--brand-2); color: #021311; border-color: transparent; }
.legend-row {
  width: min(100% - 1.35rem, var(--max-width));
  margin: 0 auto;
  padding: 0 0 .55rem;
}
.main {
  width: min(100% - 1.35rem, var(--max-width));
  margin: 0 auto;
  padding: .18rem 0 5.75rem;
}
.dashboard { display: grid; gap: .72rem; }
.glass-section,
.hero-card,
.chart-card,
.table-card,
.alert-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 72%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
  box-shadow: var(--shadow);
}
.glass-section,
.chart-card,
.table-card { padding: .92rem; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.section-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 850;
  letter-spacing: -.04em;
}
.section-subtitle {
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .84rem;
}
.hero-card {
  padding: 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  overflow: hidden;
}
.hero-card h1 {
  margin: .18rem 0 .35rem;
  font-size: clamp(2rem, 7vw, 3.15rem);
  line-height: .96;
  letter-spacing: -.075em;
  text-transform: capitalize;
}
.hero-card p { margin: 0; color: var(--muted); max-width: 58ch; }
.compact-hero h1 { font-size: clamp(1.8rem, 5.5vw, 2.45rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: .28rem .58rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(.7rem, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(100% - 1.2rem, 820px);
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  gap: .25rem;
  padding: .32rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .16);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav a {
  min-height: 48px;
  flex: 1 0 82px;
  min-width: 0;
  display: grid;
  place-items: center;
  gap: .08rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}
.bottom-nav span { font-size: 1.05rem; line-height: 1; }
.bottom-nav small { font-size: .66rem; }
.bottom-nav a.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
@media (max-width: 760px) {
  .bottom-nav {
    width: calc(100% - .7rem);
    justify-content: flex-start;
    border-radius: 26px;
  }
  .bottom-nav a {
    flex: 0 0 74px;
  }
}
@media (max-width: 680px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .header-pill { display: none; }
  .section-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) {
  .bottom-nav small { font-size: .61rem; }
  .bottom-nav a { min-height: 44px; flex-basis: 68px; }
}