# Ativa o mecanismo de rewrite
<IfModule mod_rewrite.c>
  RewriteEngine On

  # /acompanhar/ABC123...  →  frontend/acompanhar.html?token=ABC123...
  RewriteRule ^acompanhar/([a-zA-Z0-9]+)/?$ frontend/acompanhar.html?token=$1 [L,QSA]

  # /painel  →  painel da empresa
  RewriteRule ^painel/?$ frontend/painel-empresa.html [L]

  # /superadmin  →  painel do super admin
  RewriteRule ^superadmin/?$ frontend/painel-superadmin.html [L]
</IfModule>

# Bloqueia acesso direto a config/ e includes/ (compatível com Apache 2.2 e 2.4+)
<IfModule mod_authz_core.c>
  # Apache 2.4+
  <FilesMatch "\.(sql)$">
    Require all denied
  </FilesMatch>
</IfModule>
<IfModule !mod_authz_core.c>
  # Apache 2.2
  <FilesMatch "\.(sql)$">
    Order allow,deny
    Deny from all
  </FilesMatch>
</IfModule>
