/* App shell: topbar fixa + conteúdo centralizado (mobile-first) + nav inferior */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.topbar__title { font-size: var(--fs-lg); font-weight: 700; }

.topbar__actions { display: flex; align-items: center; gap: var(--space-2); }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-brand-100);
  color: var(--color-brand-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-sm);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

main.view {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) calc(var(--nav-height) + var(--space-6));
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  height: var(--nav-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--color-text-faint);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.bottom-nav__item svg { width: 20px; height: 20px; }
.bottom-nav__item.is-active { color: var(--color-brand-600); }

.bottom-nav__fab {
  position: relative;
  top: -18px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--color-brand-500), var(--color-brand-700));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}
.bottom-nav__fab svg { width: 24px; height: 24px; }

.section { margin-bottom: var(--space-5); }
.section__title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-3);
}
.section__title h2 { font-size: var(--fs-md); color: var(--color-text-soft); text-transform: uppercase; letter-spacing: 0.04em; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

@media (min-width: 560px) {
  :root { --max-width: 520px; }
}
