.app-shell {
  min-height: 100vh;
}

.public-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.public-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
}

.public-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  color: var(--color-heading);
}

.brand-mark {
  display: inline-grid;
  min-width: 72px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: linear-gradient(145deg, #173f65, var(--color-primary-strong));
  color: #fff;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(10, 35, 60, 0.18);
}

.public-main {
  display: grid;
  align-items: start;
  padding: var(--space-5);
}

.auth-panel {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 70px;
  padding: 12px clamp(18px, 2.2vw, 32px);
  border-bottom: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 10px rgba(15, 31, 46, 0.035);
  backdrop-filter: blur(12px);
}

.topbar-title {
  min-width: 0;
}

.topbar-title span {
  display: block;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.content-wrap {
  min-width: 0;
  padding: clamp(18px, 2.5vw, 38px);
  padding-bottom: 88px;
}

.page {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 24px;
  max-width: 1460px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 68px;
  border-top: 1px solid var(--color-line);
  background: var(--color-surface);
}

.side-nav {
  display: none;
}

/* ── Sidebar em seções ─────────────────────────────────── */
.side-brand {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-line);
}

/* Tabs de seção (Escala / Permuta / Peculiário) */
.section-tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  background: var(--color-surface-muted);
  border-radius: var(--radius);
  padding: 3px;
}

.section-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--space-2) var(--space-1);
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--color-muted);
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section-tab .nav-icon {
  width: 16px;
  height: 16px;
}

.section-tab:hover {
  background: var(--color-line);
  color: var(--color-text);
}

.section-tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(18, 49, 79, 0.25);
}

/* Título e links da seção */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  padding: 0 var(--space-3);
  margin-bottom: var(--space-2);
}

.section-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-empty {
  padding: var(--space-3);
  font-size: 0.82rem;
}

/* Separador e links globais */
.nav-divider {
  border: none;
  border-top: 1px solid var(--color-line);
  margin: var(--space-3) 0;
}

.global-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
