/* =========================================================
   BOTTOM NAVIGATION BAR & ACTION SHEET (PADRÃO TIKTOK / PAINÉIS)
   Compartilhado entre as páginas públicas (index, infrações, etc.)
   ========================================================= */

/* Oculto no Desktop */
@media (min-width: 769px) {
  .bottom-nav,
  .sheet-backdrop,
  .action-sheet {
    display: none !important;
  }
}

/* Visível exclusivamente no Mobile */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* BARRA FIXA INFERIOR */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(18, 18, 26, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    z-index: 9999 !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 4px 6px env(safe-area-inset-bottom, 2px) 6px !important;
    box-sizing: border-box !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.7) !important;
  }

  .bn-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    color: #94a3b8 !important;
    padding: 4px 2px !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
    min-width: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .bn-item:active {
    transform: scale(0.92) !important;
  }

  .bn-item span {
    white-space: nowrap !important;
    overflow: visible !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
    color: inherit !important;
    text-align: center !important;
    letter-spacing: -0.1px !important;
  }

  .bn-item i,
  .bn-item svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
    stroke-width: 1.9px !important;
    stroke: currentColor !important;
    transition: transform 0.15s ease !important;
  }

  .bn-item.active {
    color: var(--gold, #d4af37) !important;
  }

  .bn-item.active span {
    font-weight: 700 !important;
    color: var(--gold, #d4af37) !important;
  }

  .bn-item.active i,
  .bn-item.active svg {
    stroke: var(--gold, #d4af37) !important;
    transform: scale(1.08) !important;
  }

  /* BOTÃO CENTRAL '+' — PÍLULA ESTILO TIKTOK */
  .bn-item.center {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    min-width: 48px !important;
  }

  .bn-item.center .bn-fab {
    width: 44px !important;
    height: 30px !important;
    background: linear-gradient(135deg, #f7df8d 0%, #d4af37 50%, #b89320 100%) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35) !important;
    color: #000000 !important;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease !important;
  }

  .bn-item.center .bn-fab:active {
    transform: scale(0.90) !important;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.2) !important;
  }

  .bn-item.center .bn-fab i,
  .bn-item.center .bn-fab svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #000000 !important;
    stroke-width: 2.4px !important;
  }

  /* Alternância Deslogado vs Logado */
  html.user-logged-in .bottom-nav .auth-deslogado {
    display: none !important;
  }
  html.user-logged-in .bottom-nav .auth-logado {
    display: flex !important;
  }
  html:not(.user-logged-in) .bottom-nav .auth-logado,
  html.user-logged-out .bottom-nav .auth-logado {
    display: none !important;
  }
  html:not(.user-logged-in) .bottom-nav .auth-deslogado,
  html.user-logged-out .bottom-nav .auth-deslogado {
    display: flex !important;
  }
}

/* =========================================================
   ACTION SHEET (BOTTOM SHEET - LISTA DE LINKS)
   ========================================================= */
.sheet-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 100001 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.sheet-backdrop.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.action-sheet {
  width: 100% !important;
  max-width: 520px !important;
  background: #121217 !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  border-bottom: none !important;
  border-radius: 22px 22px 0 0 !important;
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom, 12px)) 18px !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.1) !important;
  transform: translateY(100%) !important;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
  box-sizing: border-box !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
}

.sheet-backdrop.show .action-sheet {
  transform: translateY(0) !important;
}

.sheet-handle {
  width: 40px !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 4px !important;
  margin: 0 auto 14px auto !important;
}

.sheet-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sheet-title-box h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sheet-title-box small {
  font-size: 12px !important;
  color: #94a3b8 !important;
  display: block !important;
  margin-top: 2px !important;
}

.sheet-close-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  color: #94a3b8 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: background 0.15s, color 0.15s !important;
}

.sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

.sheet-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.sheet-action-card {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 12px 14px !important;
  background: #181820 !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  color: #f1f5f9 !important;
  text-align: left !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent !important;
}

.sheet-action-card:hover {
  background: #20202c !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
}

.sheet-action-card:active {
  transform: scale(0.98) !important;
  background: rgba(212, 175, 55, 0.12) !important;
}

.sheet-action-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.sheet-action-icon i,
.sheet-action-icon svg {
  width: 18px !important;
  height: 18px !important;
}

.sheet-action-icon.gold {
  background: rgba(212, 175, 55, 0.12) !important;
  color: var(--gold, #d4af37) !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
}

.sheet-action-icon.blue {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

.sheet-action-icon.green {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.sheet-action-icon.violet {
  background: rgba(139, 92, 246, 0.12) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(139, 92, 246, 0.25) !important;
}

.sheet-action-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.sheet-action-info b {
  display: block !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  margin-bottom: 2px !important;
}

.sheet-action-info small {
  display: block !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

.sheet-arrow {
  width: 16px !important;
  height: 16px !important;
  color: #64748b !important;
  flex-shrink: 0 !important;
}
