/* ---------- Estrutura principal ---------- */
.shell { min-height: 100dvh; }
.shell-main {
  min-width: 0;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + var(--s4));
}
.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--s4) + var(--safe-t)) var(--gutter) var(--s6);
  animation: rise-in var(--med) var(--ease);
}
.page-narrow { max-width: 760px; }

/* Barra lateral (computador) */
.sidebar { display: none; }

/* Navegação inferior (celular) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(32, 34, 53, 0.04);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-2); font-size: 11px; font-weight: 500;
  transition: color var(--fast);
  min-width: 0;
}
.bottom-nav a svg.icon { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.bottom-nav a[aria-current="page"] svg.icon { stroke-width: 2.1; }

/* ---------- Cabeçalhos ---------- */
.app-header {
  display: flex; align-items: center; gap: var(--s3);
  margin-bottom: var(--s5);
}
.brand { display: flex; align-items: center; gap: var(--s3); min-width: 0; flex: 1; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
}
.brand-mark svg.icon { width: 22px; height: 22px; stroke-width: 2; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.brand-sub { font-size: var(--fs-xs); color: var(--text-2); }

.page-header {
  display: flex; align-items: center; gap: var(--s2);
  min-height: 48px; margin-bottom: var(--s4);
}
.page-header h1 { font-size: 20px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-header.sticky {
  position: sticky; top: 0; z-index: 20;
  margin: calc(-1 * (var(--s4) + var(--safe-t))) calc(-1 * var(--gutter)) var(--s4);
  padding: calc(var(--s2) + var(--safe-t)) var(--gutter) var(--s2);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  margin: var(--s6) 0 var(--s3);
}
.section-head h2 { font-size: 18px; }

/* ---------- Tela de configuração da pasta ---------- */
.setup {
  min-height: 100dvh; display: grid; place-items: center;
  padding: calc(var(--s6) + var(--safe-t)) var(--gutter) calc(var(--s6) + var(--safe-b));
}
.setup-card {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: var(--s4);
  animation: rise-in var(--med) var(--ease);
}
.setup-illus {
  width: 72px; height: 72px; border-radius: 20px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.setup-illus svg.icon { width: 34px; height: 34px; stroke-width: 1.6; }
.setup h1 { font-size: 24px; }
.setup-tree {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; line-height: 1.6;
  color: var(--text-2); background: var(--muted-soft); border-radius: var(--radius-sm);
  padding: var(--s3) var(--s4); margin: 0; white-space: pre; overflow-x: auto;
}

/* ---------- Tela cheia (editor, exploração, sessão) ---------- */
.fullscreen {
  position: fixed; inset: 0; z-index: 30;
  background: var(--bg);
  overflow: hidden;
}
